I started learning about Appium a week ago and I am testing a native Android app. I only saw one post about SwipeableWebDriver in https://discuss.appium.io. Am I using the correct driver class?
@BeforeMethod
public void setUp() throws Exception {
doSetup();
//Assign SwipeableWebDriver to WebDriver driver
driver = new SwipeableWebDriver(new URL(WEBDRIVER_URL), capabilities);
loginPage = PageFactory.initElements(driver, LoginPage.class);
feedPage = loginPage.testLogin(EMAIL, PASSWORD, SERVER);
}
public class SwipeableWebDriver extends RemoteWebDriver implements HasTouchScreen {
private RemoteTouchScreen touch;
public SwipeableWebDriver(URL remoteAddress,
Capabilities desiredCapabilities) {
super(remoteAddress, desiredCapabilities);
touch = new RemoteTouchScreen(getExecuteMethod());
}
public TouchScreen getTouch() {
return touch;
}
}