appium/appium-inspector

bug: <Cannot use AppiumBy.ID even though it is suggested from Appium Inspector>

phatle1 opened this issue · 6 comments

Is this an issue specifically with Appium Inspector?

  • I have verified that my issue does not occur with Appium, and should be investigated as an Appium Inspector issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Screenshot 2024-02-27 at 15 45 34

Please have a look at the image above, I'm trying to use the recorder to speed up my task and I can find it by ID from Appium Inspector as well

Screenshot 2024-02-27 at 15 47 30

But when I put it into my source code and run, A NoSuchElementException is shown
Screenshot 2024-02-27 at 16 04 29

Works fine with Xpath
Please someone can help me with this
Appreciate for your kind support

Expected Behavior

I would use AppiumBy.ID as normal

Operating System

Mac

Appium Inspector Version

2024.2.2

Appium Version

2.5.1

Further Information

No response

Are you changing the disableIdLocatorAutocompletion setting to true in both the Inspector and your test?

Are you changing the disableIdLocatorAutocompletion setting to true in both the Inspector and your test?

hi, no I didn't, here is my caps setup
Screenshot 2024-02-27 at 17 01 58

Can you please provide a screenshot of the element details side panel in the Inspector? I'm not sure how you are able to find it without disableIdLocatorAutocompletion.

sure, here is the screenshot
Screenshot 2024-02-27 at 20 33 50
Screenshot 2024-02-27 at 20 32 19

It's odd that you can find this element using the ID without additional changes. Could you please provide the Appium log?
Also, try launching your test with this additional capability: "appium:settings[disableIdLocatorAutocompletion]": True

you saved my day, by following your instructions, I found the relevant document.

https://github.com/appium/appium-uiautomator2-driver/blob/master/README.md

once again thank you.