0

I'm using the PHP Webdriver with Selenium for a page that is mostly composed of a large canvas. I want to click on specific buttons in this canvas, unfortunately I'm unable to get any information regarding the buttons (can't inspect the canvas).

How can I guess or calculate the coordinates of the buttons? I was thinking to move my mouse around and get live coordinates but haven't found a way to to that. Any other way you may think of?

Alternatively, any method to inspect the content of the canvas would help!

remyremy
  • 3,548
  • 3
  • 39
  • 56
  • Does [this](https://stackoverflow.com/questions/59918530/how-to-find-the-coordinates-of-the-buttons-on-a-canvas-and-click-on-them-after/59923053#59923053) or [this](https://stackoverflow.com/questions/60061414/how-to-click-the-center-of-the-canvas-in-java-selenium-driver/60146903#60146903) discussion help you? – undetected Selenium Jul 15 '20 at 20:53
  • Clicking anywhere is the canvas is fine, I can already do that, so the second link doesn't help. I will look into the first link a bit more, it could maybe work, however it means I need to figure out the coordinates for each button in the canvas; maybe with [Point Position](https://www.snapfiles.com/get/pointpos.html) or similar – remyremy Jul 16 '20 at 06:33

0 Answers0