selenium - Swipe method not supporting in android appium -
i tried swipe method in android,but not working.
code:-
public void swipe() { javascriptexecutor js = (javascriptexecutor) driver; hashmap < string, double > swipeobject = new hashmap < string, double > (); swipeobject.put("startx", 0.95); swipeobject.put("starty", 0.5); swipeobject.put("endx", 0.05); swipeobject.put("endy", 0.5); swipeobject.put("duration", 1.0); js.executescript("emulator: swipe", swipeobject); }
error:-
org.openqa.selenium.webdriverexception: not yet implemented.
any great apprciation.
changing context native_app
worked me:
string originalcontext = driver.getcontext(); driver.context("native_app"); driver.swipe(startx, starty, endx, endy, duration); driver.context(originalcontext );
Comments
Post a Comment