Using IWebElement.Location
, I can get the coordinates of the upper-left corner of an element relative to the upper-left corner of the page.
But this location doesn't tell me where the element is located in the current browser window, that is, whether it is off screen or on screen and if onscreen, then whether near the top or bottom or middle etc. Is there any way to get this info in C#
?
Thanks!
Edit:
For context, the problem I'm trying to solve is something like this:
1. Create a Selenium WebDriver instance and go to the page http://en.wikipedia.org/wiki/Selenium_(software)
2. Click on a link on the Contents table, say Selenium IDE.
I need to verify that clicking on the link takes me to the Selenium IDE section on the page, that is, the Selenium IDE section is now displayed near the top of the browser window.