Issue : cannot find symbol; symbol: method swipe(SwipeElementDirection,int)

error: cannot find symbol
[javac] x.swipe(SwipeElementDirection.RIGHT, 2000);
[javac]     ^
[javac] symbol:   method swipe(SwipeElementDirection,int)
[javac] location: variable x of type MobileElement
While attempting to perform a swipe using javaclient 3.0 on windows, an issue has been observed.
Below function uses swipe function with arguments direction and position, seems not to work due to some reason.
public void swipeRight(){

  MobileElement x = (MobileElement) driver.findElement(By.id("myTestIdHere"));

  x.swipe(SwipeElementDirection.RIGHT, 2000);



Seems like some issue on windows version of Appium 1.4.0. Lot of people are raising this issue. You can try downgrading appium to 1.3.7 or upgrade to recent version to see if it works for you.

No comments :

Post a Comment

Recent Posts