0

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 ?

eugene.polschikov
  • 7,254
  • 2
  • 31
  • 44
Gaurav
  • 197
  • 1
  • 7

1 Answers1

0

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

Gaurav
  • 197
  • 1
  • 7
karthick23
  • 1,313
  • 1
  • 8
  • 15
  • Getting error as "The method swipe(int, int, int, int, int) is undefined for the type MobileWebDriver" I am using Seetest MobileWebDriver sir – Gaurav Jun 09 '16 at 06:28