I am unable to click on the button (marked in red).
I have tried this > driver.findElement(By.xpath("//android.widget.Button[contains(@text=’R′]")).click();
But it is giving an error " no such element present ".
Can you guys please help me.
How to handle a button with same “text” and “className”?
Please ask your developer/s or the manager ( to ask them ) to provide accessibility id for each of the elements, as it will help in automation and as well making sure your app is accessibility compatible
Refer to
https://appium.io/docs/en/writing-running-appium/finding-elements/
https://medium.com/the-ministry-of-testing/adding-accessibility-identifiers-to-an-ios-app-c8e09d9c20f3
I think you need to change as, driver.findElement(By.xpath("//android.widget.Button[@text=’R′]").click();