Appium X-Paths
Android
Widget with Using class with index
driver.findElement(By.xpath("//android.widget.EditText[1]"));
Widget with Using class, text attribute
driver.findElement(By.xpath("//android.widget.Button[@text='Login']));
Widget with Using class and Resource ID
driver.findElement(By.xpath("//android.widget.Button[@resource-id='com.pkgname.xxx']));
Widget with Using text attribute and with different approaches.
//*[@text="foo"]));
//*[contains(@text, "fo")]
//*[@text='Text1' and ../*[@text='Text2']]
Widget with ID
//*[@id='ABC']
iOS
//UIAApplication[1]/UIAWindow[1]/UIAButton
//XCUIElementTypeStaticText[@name="YourText"]
//XCUIElementTypeButton[@name="YourText"]
Android
Widget with Using class with index
driver.findElement(By.xpath("//android.widget.EditText[1]"));
Widget with Using class, text attribute
driver.findElement(By.xpath("//android.widget.Button[@text='Login']));
Widget with Using class and Resource ID
driver.findElement(By.xpath("//android.widget.Button[@resource-id='com.pkgname.xxx']));
Widget with Using text attribute and with different approaches.
//*[@text="foo"]));
//*[contains(@text, "fo")]
//*[@text='Text1' and ../*[@text='Text2']]
Widget with ID
//*[@id='ABC']
iOS
//UIAApplication[1]/UIAWindow[1]/UIAButton
//XCUIElementTypeStaticText[@name="YourText"]
//XCUIElementTypeButton[@name="YourText"]
Finding the time and actual effort to create a superb article like this is great thing. I’ll learn many new stuff right here! Good luck for the next post buddy..
ReplyDeleteSoftware Testing Services
Functional Testing Services
Test Automation Services
QA Automation Testing Services
Regression Testing Services
API Testing Services
Compatibility Testing Services
Performance Testing Services
Security Testing Services
Software Testing Company
Software Testing Services in USA
Software Testing Companies in USA
Wow its a very good post. The information provided by you is really very good and helpful for me. Keep sharing good information.
ReplyDeleteSoftware Testing Services
Software Testing Services in India
Software Testing Companies in India
Software Testing Services in USA
Software Testing Companies in USA
Software Testing Companies
Software Testing Services Company
QA Testing Services