Unable to inspect elements of screen containing recycler view
created
Sep '18
last reply
Oct '18
- 17
replies
- 539
views
- 4
users
- 1
link
Unable to inspect elements of screen containing recycler view
driver.findElementByXPath("/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout[2]/android.support.v4.view.ViewPager/android.view.ViewGroup/android.widget.ScrollView/android.widget.LinearLayout/android.support.v7.widget.RecyclerView[1]/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.TextView[3]").click();
I simply copy pasted from Appium desktop. But the issue is still there. It is unable to click.
("//android.widget.TextView[@text=‘SOLVE’]")
Can you try this xpath? Adjust the single and doubt quotes in your IDE
This is the error I am getting:
[HTTP] --> POST /wd/hub/session/7f970102-3ae8-473c-8ca8-791f4f59abe4/element
[HTTP] {“using”:“xpath”,“value”:"//android.widget.TextView[@text=‘SOLVE’]"}
[W3C] Calling AppiumDriver.findElement() with args: [“xpath”,"//android.widget.TextView[@text=‘SOLVE’]",“7f970102-3ae8-473c-8ca8-791f4f59abe4”]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 10000 ms for condition
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘SOLVE’]",“context”:"",“multiple”:false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘SOLVE’]",“context”:"",“multiple”:false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘//android.widget.TextView[@text=‘SOLVE’]’ using ‘XPATH’ with the contextId: ‘’ multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:32,“value”:“javax.xml.transform.TransformerException: A location path was expected, but the following token was encountered: ‘SOLVE’”}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Matched JSONWP error code 32 to InvalidSelectorError
[W3C] Encountered internal error running command: InvalidSelectorError: javax.xml.transform.TransformerException: A location path was expected, but the following token was encountered: ‘SOLVE’
[W3C] at errorFromMJSONWPStatusCode (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:784:12)
[W3C] at Socket. (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-android-bootstrap/lib/bootstrap.js:139:18)
[W3C] at emitOne (events.js:116:13)
[W3C] at Socket.emit (events.js:211:7)
[W3C] at addChunk (_stream_readable.js:263:12)
[W3C] at readableAddChunk (_stream_readable.js:246:13)
[W3C] at Socket.Readable.push (_stream_readable.js:208:10)
[W3C] at TCP.onread (net.js:594:20)
[HTTP] <-- POST /wd/hub/session/7f970102-3ae8-473c-8ca8-791f4f59abe4/element 400 195 ms - 931
[HTTP]