AndroidViewClient icon indicating copy to clipboard operation
AndroidViewClient copied to clipboard

NO_ID changes between devices

Open imiten opened this issue 12 years ago • 1 comments

Hi,

I noticed that if I run code on emulator and then on device I get different ids for widgets. This causes my script to fail. Also is there some trick to get ids to match up with R.id ? why do we get NO_ID in dump ?

Apart from it non-ui testing can it be done with AndroidViewClient ? I prefer doing it such that scripts run fast then is py4a better option ? usually testing is done against emulator or actual devices ?

I did not find link to mailing list so posting all here.

Regards,

Miten.

imiten avatar Sep 24 '13 16:09 imiten

You can use tag androidviewclient on stackoverflow to post related questions and github to report issues that can be tracked.

Are you using exactly the same android version on emulator and device? Can you post the result of dump -Vi for both? Screenshots?

The reason why ids are not included is because they are not available through UiAutomator dump, which is the default back-end for API >= 16. You can still force the use of ViewServer back-end and obtain the ids. See select correct implementation for details.

dtmilano avatar Sep 26 '13 02:09 dtmilano