Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Locating Elements with Appium

Category: Appium

By ID : AndroidElement button = driver.findElementById(“com.example.android.apis:id/button”);
By Class : AndroidElement checkBox = driver.findElementByClassName(“android.widget.CheckBox”);
By XPath : AndroidElement secondButton = driver.findElementByXPath(“//*[@resource-id=’com.example.android.apis:id/button’]”);
By AndroidUIAutomator : AndroidElement thirdButton = driver.findElementByAndroidUIAutomator(“new UiSelector().textContains(\”BUTTO\”);”);

Leave a Reply

Your email address will not be published. Required fields are marked *