Play with scroll bars on a page in selenium and javaScript

There are some situations in which we want to scroll to a particular element or scroll up or down across the browser.

Selenium do not have it’s own methods to perform this action, so we can use javascript to play on scroll lbars.

Let’s see some of the ways:

Another way –

 

Content posted is based on learning or working experience, please leave comments if anything needs to be added or updated, discuss your queries on our facebook:qavalidation.com, Thanks!

1 Response

  1. June 12, 2016

    […] How to scroll on a page or to view an element […]

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: