This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
1 / 3
Jan 2018

Hi All,

I have an android application that I need to test.
I am using Appium Version: 1.3.1 (Server 1.7.2)
I am using Node.js along with JavaScript for tests
Can anyone provide me basic examples for TouchAction functions for tap, longPress,etc as we use them in Java.
I’m using wd.js package for the purpose.

  • created

    Jan '18
  • last reply

    Jan '18
  • 2

    replies

  • 356

    views

  • 3

    users

  • 1

    link

public static void Vertical_Scroll(double verticalPositionY,double verticalUptoScrollY ) throws Exception
{
Dimension dim=driver.manage().window().getSize();
int height =dim.getHeight();
int width= dim.getWidth();
int starty=(int) (height * verticalPositionY);
int x = (int) (width *.50);
int endy =(int) (height * verticalUptoScrollY);
TouchAction t=new TouchAction(funcation.driver);
t.longPress(x, starty).moveTo(x,endy).release().perform();
}