Welcome to the Question and Answer site for Software Testing Professionals

You can get your queries resolved from Software Testing Professionals.

Ask a Question

Get answers and give answers to questions from other members.

View All Questions

Get votes and earn points to build your reputation in community.

View Hot Questions

1
How to scroll a page vertically by 80px with Selenium Webdriver and Java?

Open 1 Answers 29 Views
1 1
How to scroll a page vertically by 80px with Selenium Webdriver and Java?

1 Answer

0
0

Scrolling up should be as below.

((JavascriptExecutor) driver).executeScript("scroll(0,-80);");
 
To scroll down
 
((JavascriptExecutor) driver).executeScript("scroll(0,80);");
 
You need to figure out equivalent value of 80px here. As -80 is not equivalant to 80px
 
Hope that helps.
answered by (192 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

We have resolved 1.2k+ Software Testing queries!

Software Testing Board Weekly update

We will send you handpicked questions that you would love to answer.

View previous campaigns.

Top Contributors

...