Appium inspector: Unable to inspect an element
hananurrehman opened this issue · 2 comments
Do I have the most recent component updates?
- I use the most recent available driver/plugin and server versions
Is the component officially supported by the Appium team?
- I have verified the component repository is present under the Appium organization in GitHub
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I'm trying to select the following element:
But appium inspector is unable to click on it. I'm able to select it from the App source section but in the tests wdio is then unable to find it.
This is how I'm trying to assert it:
await expect($('//android.widget.TextView[@text="Catalog"]')).toHaveText(
"Catalog"
);
Expected Behavior
Element should be selectable from the inspector and wdio should be able to assert on it.
Minimal Reproducible Example
Repo:
https://github.com/hananurrehman/appiumpractice/blob/master/test/spec/tests.js
Environment
No response
Link to Appium Logs
No response
Further Information
No response
When you say 'appium inspector is unable to click on it', do you mean selecting the element by clicking on the screenshot? Since you are also saying that you can select it using the app source.
If yes, it's likely there are multiple elements overlapping there, so you may want to use the element handles toggle: https://appium.github.io/appium-inspector/latest/session-inspector/screenshot/#element-handles-toggle
Your other issue with WDIO not being able to find the element is not related to the Inspector. But since the Inspector itself is using WDIO under the hood, you may want to double check your locators by using the element search functionality in the app header: https://appium.github.io/appium-inspector/latest/session-inspector/header/#search-for-element
Thanks I'll try this out.