[ACCEPTED]-How to find xpath in mobile app using appium-appium
Accepted answer
Please use this Xpath , I hope this solves 1 your problem:
By.xpath("//android.widget.EditText[@text='Email ID']")
A better way of doing this is as follows 1 -
driver.findElement(By.xpath("//EditText[contains(@text,'Edit ID')]"));
u can do it in another way ,u know that 4 there are 5 textfields , hence write the 3 code as below.
driver.findelements(By.tagname("textfield")).get(0).sendkeys("abc@gmail.com"));
this 2 means that you are trying to pass the abc@gmail.com 1 value in the first text field "get(0)".
Find xpath of mobile app using contains
driver.findElement(By.xpath("//android.widget.TextView[contains(@text, 'Call')]")).isDisplayed())
0
By using the available properties - index 2 and class name, you can try with the below 1 xpath
//android.widget.EditText[@index='2']
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.