RE: Identify Scroll bar

Thanks Virendra for sharing the answer!!

Scroll Bar is getting handle by using offset method but still its getting an error i.e.
Exception in thread “main” org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: Offset within element cannot be scrolled into view: (0, 42.5): [object XrayWrapper [object HTMLDivElement]]
Command duration or timeout: 10 milliseconds

&
few time it successfully gets executed

Could you provide the solution for it ?

Add Comment
9 Answers

You can use something like that for scrolling up/down.Just specifying the coordinates

JavascriptExecutor jse=(JavascriptExecutor)driver;
jse.executeScript(“window.scrollBy(0,250)”,””);

Default Answered on September 4, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.