1

I would like to know if there's any way to know the absolute position of the browser's visible canvas. Ex: if I'm at a webpage and I scroll down 200px, I would like to know I'm on the coordinate {X,200}.

Is there a way to do this using Selenium Webdriver?

Thanks

PS - I know that the Element has the property Position, which returns his absolute position on the page. I'm not sure if this may help, though.

1 Answer 1

1

This has been asked a few times on StackOverflow and every answer I found points to using JavaScriptExecuter.

2
  • Thanks Kirbycope, but what I'd like to know is in which position I am when I go to the bottom of the page, and not to scroll there. But this will be useful anyways, thanks!
    – Tiago
    Commented Jun 15, 2015 at 14:07
  • The same principle applies. You can use the JavaScriptExecuter to get the values you need. Here is an example, stackoverflow.com/a/3464890/1106708
    – kirbycope
    Commented Jun 15, 2015 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.