Finding Element using ID is taking lot of time only on a particular page in Android

Hi,

Recently I observed an issue where finding element using ID is taking more time only on one particular page (Around 20 seconds), where as on all other pages the actions are happening very quick. This is affecting my testcase execution as I have to perform some operations on that page in very short time.

Below are the desired capabilities:

{
“platformName”: “Android”,
“platformVersion”: “8.1.0”,
“deviceName”: “Nexus6P”,
“noReset”: true,
“udid”: “2c44ce50350b7ece”,
“appPackage”: “org.vom8x8.sipua”,
“appActivity”: “com.vom8x8.vom.login.loginUI.LoginActivity”,
“newCommandTimeout”: “900000”
}

I tried with appium 1.7.2,1.10 and 1.13 and still seeing the same issue. Can anyone please help me with this issue.

The logs for finding elements are

[MJSONWP (35a5681a)] Calling AppiumDriver.getWindowSize() with args: [“current”,“35a5681a-219f-4ea0-a694-556413f30452”]
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:{“height”:2792,“width”:1440}}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP (35a5681a)] Responding to client with driver.getWindowSize() result: {“height”:2792,“width”:1440}
[HTTP] <-- GET /wd/hub/session/35a5681a-219f-4ea0-a694-556413f30452/window/current/size 200 19 ms - 100
[HTTP]
[HTTP] --> POST /wd/hub/session/35a5681a-219f-4ea0-a694-556413f30452/elements
[HTTP] {“using”:“id”,“value”:“org.vom8x8.sipua:id/end_button”}
[MJSONWP (35a5681a)] Calling AppiumDriver.findElements() with args: [“id”,“org.vom8x8.sipua:id/end_button”,“35a5681a-219f-4ea0-a694-556413f30452”]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator

[BaseDriver] Waiting up to 0 ms for condition

[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“org.vom8x8.sipua:id/end_button”,“context”:"",“multiple”:true}}

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“org.vom8x8.sipua:id/end_button”,“context”:"",“multiple”:true}}

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘org.vom8x8.sipua:id/end_button’ using ‘ID’ with the contextId: ‘’ multiple: true

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=org.vom8x8.sipua:id/end_button]

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=org.vom8x8.sipua:id/end_button]

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=org.vom8x8.sipua:id/end_button]

[HTTP] --> POST /wd/hub/session/35a5681a-219f-4ea0-a694-556413f30452/elements

[HTTP] {“using”:“id”,“value”:“org.vom8x8.sipua:id/end_button”}

[MJSONWP (35a5681a)] Calling AppiumDriver.findElements() with args: [“id”,“org.vom8x8.sipua:id/end_button”,“35a5681a-219f-4ea0-a694-556413f30452”]

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (1)

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=1, RESOURCE_ID=org.vom8x8.sipua:id/end_button]

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:[{“ELEMENT”:“1”}]}

[AndroidBootstrap] Received command result from bootstrap

[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator

[BaseDriver] Waiting up to 0 ms for condition

[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“org.vom8x8.sipua:id/end_button”,“context”:"",“multiple”:true}}

[MJSONWP (35a5681a)] Responding to client with driver.findElements() result: [{“element-6066-11e4-a52e-4f735466cecf”:“1”,“ELEMENT”:“1”}]

[HTTP] <-- POST /wd/hub/session/35a5681a-219f-4ea0-a694-556413f30452/elements 200 20142 ms - 131

[HTTP]

Attached the complete logs and the pagesourceAppiumLogs.txt (27.4 KB) TotalPageSource.txt (67.2 KB)