I have one test case I need to
check the scroll position. If I click the url on the page, it will scroll down
to the bottom of the page.
After looking into this
interesting feature, here is the code I use in different browsers.
Before clicking the url, the
value will be 0. After clicking the url , the value will be different.
public long
GetScrollPosition()
{
IJavaScriptExecutor executor = (IJavaScriptExecutor)_driver;
return (long)executor.ExecuteScript("return
window.pageYOffset;");
}
1 comment:
Amazing write-up! , i Request you to write more blogs like this Blockchain Online course Bangalore
Post a Comment