Hi everyone,
I’ve met some unexpected behavior while trying to automate login in my Android app.
Appium 1.7.1
Scenario:
- Launch App
- Click login button (by id)
- here google smart lock window appears
- click “cancel” on google smart lock (by id, “com.google.android.gms:id/cancel”)
- trying to click “edit_userName” button, but now can’t find such element by id. And can’t find any element by id or text of my application wich is on screen now.
If I connect device without google smart lock everything works perfect.
It seems like I’m loosing focus of my app.
Some appium log
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding 'edit_username' using 'ID' with the contextId: '' multiple: false
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=myapp:id/edit_username]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=android:id/edit_username]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=edit_username]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[DESCRIPTION=edit_username, INSTANCE=0]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding 'edit_username' using 'ID' with the contextId: '' multiple: false
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=myapp:id/edit_username]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=android:id/edit_username]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=edit_username]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[DESCRIPTION=edit_username, INSTANCE=0]
[debug] [AndroidBootstrap] Received command result from bootstrap
[HTTP] <-- POST /wd/hub/session/f8e8fd85-b544-432d-bf2b-d1e3e66e24a6/element 500 22961 ms - 164
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":7,"value":"No element found"}
Any thoughts how to handle this?