Hi All,
I am facing issue while trying to locate an element in a list view.
Sometime it works and it fails in the next iteration.
I have used “id” as a locator and as well as xpath in next iteration. But it fails intermittently in both cases.
Much appreciate help.
[debug] [MJSONWP] Calling AppiumDriver.getCurrentContext() with args: [“b53004b0-b454-493a-8995-698d3aa5a6ba”]
[debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: “NATIVE_APP”
[HTTP] <-- GET /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/context 200 1 ms - 84
[HTTP] --> POST /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/elements {“using”:“id”,“value”:“signal_strength_id”}
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: [“id”,“signal_strength_id”,“b53004b0-b454-493a-8995-698d3aa5a6ba”]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“signal_strength_id”,“context”:"",“multiple”:true}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“signal_strength_id”,“context”:"",“multiple”:true}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘signal_strength_id’ using ‘ID’ with the contextId: ‘’ multiple: true
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=com.dewalt.toolconnectv2:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=com.dewalt.toolconnectv2:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=com.dewalt.toolconnectv2:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=android:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=android:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=android:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[DESCRIPTION=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[DESCRIPTION=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[DESCRIPTION=signal_strength_id, INSTANCE=0]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘signal_strength_id’ using ‘ID’ with the contextId: ‘’ multiple: true
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=com.dewalt.toolconnectv2:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=com.dewalt.toolconnectv2:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=com.dewalt.toolconnectv2:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=android:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=android:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=android:id/signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[DESCRIPTION=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[DESCRIPTION=signal_strength_id]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[DESCRIPTION=signal_strength_id, INSTANCE=0]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:[]}
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/elements 200 37393 ms - 74
[HTTP] --> POST /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/timeouts {“type”:“implicit”,“ms”:1000}
[debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: [“implicit”,1000,“b53004b0-b454-493a-8995-698d3aa5a6ba”]
[debug] [BaseDriver] Set implicit wait to 1000ms
[debug] [MJSONWP] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/timeouts 200 2 ms - 76
[HTTP] --> POST /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/timeouts {“type”:“implicit”,“ms”:0}
[debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: [“implicit”,0,“b53004b0-b454-493a-8995-698d3aa5a6ba”]
[debug] [BaseDriver] Set implicit wait to 0ms
[debug] [MJSONWP] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/timeouts 200 2 ms - 76
[HTTP] --> GET /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/context {}
[debug] [MJSONWP] Calling AppiumDriver.getCurrentContext() with args: [“b53004b0-b454-493a-8995-698d3aa5a6ba”]
[debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: “NATIVE_APP”
[HTTP] <-- GET /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/context 200 1 ms - 84
[HTTP] --> POST /wd/hub/session/b53004b0-b454-493a-8995-698d3aa5a6ba/elements {“using”:“xpath”,“value”:"//android.widget.ListView/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.ImageView[4]"}
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: [“xpath”,"//android.widget.ListView/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.ImageView[4]","b53004b0-b454-493a-8995-698d3aa5a6ba"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.ListView/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.ImageView[4]",“context”:"","multiple":true}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.ListView/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.ImageView[4]",“context”:"","multiple":true}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘//android.widget.ListView/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.ImageView[4]’ using ‘XPATH’ with the contextId: ‘’ multiple: true