How to find xpath in mobile app using appium

34,609

Solution 1

Please use this Xpath , I hope this solves your problem:

By.xpath("//android.widget.EditText[@text='Email ID']")

Solution 2

A better way of doing this is as follows -

driver.findElement(By.xpath("//EditText[contains(@text,'Edit ID')]"));
Share:
34,609
Kaivalya
Author by

Kaivalya

Software Tester I have the knowledge of manual testing,Automation Testing,Mobile Testing In automation I have knowledge of selenium webdriver, Appium, & Jmeter

Updated on December 06, 2020

Comments

  • Kaivalya
    Kaivalya over 3 years

    I tried using Find element by id but it is not inserting required data. Then I used Find element by xpath //android.widget.ScrollView[0]/android.widget.RelativeLayout[0]/android.widget.TextView[0]/ndroid.widget.TextView[1]/android.widget.EditText[2]")).sendKeys("[email protected]");

    but still it is not working.enter image description here