Can something like this work? Well, it's not working for me. Guys, what's the right-est way of making it work? Need Help (Appium version - 1.4.0.0 and Selenium 2.4.5)
dr.findElement(By.xpath("//android.widget.ImageButton[@bounds='[9,288][144,318]']"))
.click();
You can find the ID of an element using android uiautomatorviewer. just go to your SDK tools folder D:\Android\android-sdk\tools, here you can find uiautomatorviewer. Open it and take screen shots of your activity and find the id, class, package of any element. Highly active question.
Use the UI Automator API, in particular the UiSelector class to locate elements. In Appium you send the Java code, as a string, to the server, which executes it in the application's environment, returning the element or elements.
Try below code, it works for me...
WebElement abc = driver.findElement(By.xpath ("//android.widget.ImageButton[@bounds='[9,288][144,318]']"))
abc.click();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With