Skip to content

Commit 6a58a55

Browse files
author
Tejas Shah
committed
update sendKeys call
1 parent 3411a96 commit 6a58a55

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

ios/BrowserStackIOS.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,7 @@ public static void main(String args[]) throws MalformedURLException, Interrupted
3030
loginButton.click();
3131
IOSElement emailTextField = (IOSElement) new WebDriverWait(driver, 30).until(
3232
ExpectedConditions.elementToBeClickable(MobileBy.AccessibilityId("Email address")));
33-
34-
// element.sendKeys() method is not supported in Appium 1.6.3
35-
// Workaround for sendKeys() method:
36-
emailTextField.click();
37-
String email = "hello@browserstack.com";
38-
for (int i = 0; i < email.length(); i++) {
39-
driver.findElementByXPath("//XCUIElementTypeKey[@name='" + email.charAt(i) + "']").click();
40-
}
33+
emailTextField.sendKeys("hello@browserstack.com");
4134

4235
driver.findElementByAccessibilityId("Next").click();
4336
Thread.sleep(5000);

0 commit comments

Comments
 (0)