Since these nodes don't have ids and text, I have used xpath to find the element but find element fails
I have tried different xpaths as below but none work.
xpath=//android.view.View[10]
xpath=//android.widget.FrameLayout[1]/android.view.View[10]
xpath=//*[@class='android.view.View' and @index='11']
I want to find the element
node (11)View[90,1395][990,1575]
These are the failure messages for the xpaths I tried:
xpath=//android.view.View[10]
INFO : Clicking element 'xpath=//android.view.View[10]'.
FAIL : ValueError: Element locator 'xpath=//android.view.View[10]' did not match any elements.
xpath=//android.widget.FrameLayout[1]/android.view.View[10]
INFO : Clicking element 'xpath=//android.widget.FrameLayout[1]/android.view.View[10]'.
FAIL : ValueError: Element locator 'xpath=//android.widget.FrameLayout[1]/android.view.View[10]' did not match any elements.
xpath=//*[@class='android.view.View' and @index='11']
INFO : Clicking element 'xpath=//*[@class='android.view.View' and @index='11']'
FAIL : ValueError: Element locator 'xpath=//*[@class='android.view.View' and @index='11']' did not match any elements.
This is the element layout
I want to click the element (11)View index[11]
, to go to the app setting page
I used Robot framework to write the script.
The developers use "React Native" to develop this application. I will try to ask them to add the resource-id or text.