Skip to content
Advertisement

Two identical AutomationID using xpath python with appium

In in our mobile app, there are two boxes with the same AutomationId. For automated testing i need to find the first of the two elements by xpath. I tried following code, bt it didn’t work:

JavaScript

Thanks!

Advertisement

Answer

You can handle the following way

JavaScript

Description :

First, get the all identical elements through “find_elements” this will give you as an array of elements then you can perform the actions accordingly

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement