Scrolling issue in SeeTest Automation using Selenium webdriver

434 Views Asked by At

I am facing Scrolling issue in SeeTest Automation for Android automation using Mobile Webdriver + Selenium .

I have tried JScriptExcecutor , Scroll methods also but i was not able to scroll so anyone can help me regarding this ?

1

There are 1 best solutions below

1
On

you can scroll in android device using screen dimensions, find the below function,

public void scroll() throws IOException {
              try {
                Dimension dimensions = driver.manage().window().getSize();
                System.out.println("Size of Window= " +dimensions);
                int Startpoint = (int) (dimensions.getHeight() * 0.5);
                System.out.println("Size of scrollStart= " +Startpoint );
                int scrollEnd = (int) (dimensions.getHeight() * 0.2);
                System.out.println("Size of cscrollEnd= " + scrollEnd);             
                driver.swipe(0, Startpoint,0,scrollEnd,1000);           

                } catch (IOException e) {

                }    
          }

add this to ur code and simply use scroll(); in ur test case