Appium version: 1.6.2
iOS version: 10.1
Simulator model: iPhone 6
I'm having the same issue that a number of other users are having. Since updating my code/configs/environment to accommodate the XCUITest framework, TouchActions are not responding. The following code is a simple login sequence that I'm using for a login page (WebView):
My code:
public boolean enterUserEmail(String email) {
try {
WaitUtilityIOSspk.waitForElementToBeTappable(driver, TXT_FIELD_EMAIL, 20);
GestureUtilityIOSspk.tap(driver, TXT_FIELD_EMAIL);
driver.findElement(TXT_FIELD_EMAIL).clear();
driver.executeScript("target.frontMostApp().keyboard().typeString('" + email + "')");
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public static void tap(IOSDriver<MobileElement> driver, By by) {
TouchAction action = new TouchAction(driver);
action.press(driver.findElement(by)).release().perform();
}
If I replace GestureUtilityIOSspk.tap(driver, TXT_FIELD_EMAIL); with driver.findElement(TXT_FIELD_EMAIL).click();, I can successfully tap the email field and the keyboard appears. It's worth noting that the test fails at this line: driver.executeScript("target.frontMostApp().keyboard().typeString('" + email + "')");. The log says that this method is not implemented.