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

Let me give a quick answer without code and will update thread with some code if required

1. So may want to use movetoelement command first to put mouse focus on the element, so that it appears.
2. Then it seems that the y axis that you are using is to big to move the element. This’ might throw the exception mentioned above.
Try smaller values of y

Virender

Professor Answered on April 24, 2015.
Add Comment

Your Answer

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