0
votes

I'm using Appium to automate testing of iOS native app. I have everything setup and run the test using Java. However, I'm running into some issue with trying to input textfield values.

I'm accessing the textfield elements using accessibility labels (By.name) and setting the values as below -

driver.findElement(By.name("emailTextField")).sendKeys("myusername");
driver.findElement(By.name("passwordTextField")).sendKeys("mypasswd");

Below is the screenshot once the values have been set. You will notice that the placeholder text for the text fields is still there behind and the password value is not secure. But the real issue is that the login fails

http://i.imgur.com/WMnoNgK.png

Now, if I change my code and access element using tag names, I don't see any placeholder texts, password value is secure and I can login.

driver.findElement(By.tagName("textfield")).sendKeys("myusername");
driver.findElement(By.tagName("secure")).sendKeys("mypasswd");

My question is that - I want to use accessibility labels (By.name) and not sure how to get it to work correctly. Thanks.

1

1 Answers

0
votes

In response to my post at here, I opened an issue - https://github.com/appium/java-client/issues/9