Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
1.2k views
by

I have a webpage having 2 scrollbars - outer scrollbar which adjusts the page scrolling and an inner scrollbar which adjusts table scrolling. I have below scenario to test

1. Search a record, scroll down the table to verify search results.

2.Now scroll up the table to click on refresh(which is on top of the page), then scroll down the table again to verify the search results.

My issue is at step2.  Below code scrolls up the outer scroll bar till the top of page.

jse.executeScript("window.scrollTo(document.body.scrollHeight,0)");

But I am not able to scroll up the table using inner scroll bar. I have tried almost all java script scroll methods like scrollTo, scrollBy etc. Also I tried using Actions class moveToElement method to move inside the table and then scroll up. But none of this is working.

Can anyone please help me out here with any suggestions on how to proceed on this.

My UI is a confidential one. So I will just attach scrollbar pic here.Scroll Bar image

by Master (1.2k points)
are you dealing with iframe? you may have to switch to iframe. I assume it's an iframe based on my past experience.

Please log in or register to answer this question.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...