Hi,
I am facing issues in finding elements using uiautomator.
DesiredCapability - automationName is set to uiautomator2
Element to find: new UiScrollable(new UiSelector().scrollable(true).instance(0)).getChildByText(new UiSelector().className(“android.widget.TextView”),“Log off”)
I could see the screen is scrolling but it just stops and doesnt return the element, instead it throws ESOCKETTIMEOUT error.
Below is the appium log:
[debug] [MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/0f1dc2f8-f219-4170-9ffe-7579e07e7883/elements 200 147 ms - 74
[HTTP] --> POST /wd/hub/session/0f1dc2f8-f219-4170-9ffe-7579e07e7883/elements {“using”:"-android uiautomator",“value”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).getChildByText(new UiSelector().className(“android.widget.TextView”),“Log off”)”}
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: ["-android uiautomator",“new UiScrollable(new UiSelector().scrollable(true).instance(0)).getChildByText(new UiSelector().className(“android.widget.TextView”),“Log off”)”,“0f1dc2f8-f219-4170-9ffe-7579e07e7883”]
[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] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8202/wd/hub/session/6f00f694-4cbf-4cc1-a3c8-61b7ad81a0ac/elements] with body: {“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).getChildByText(new UiSelector().className(“android.widget.TextView”),“Log off”)”,“context”:"",“multiple”:true}
[MJSONWP] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
at JWProxy.proxy$ (…/…/…/lib/jsonwp-proxy/proxy.js:144:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session/0f1dc2f8-f219-4170-9ffe-7579e07e7883/elements 500 240021 ms - 251
Is anyone facing similar issue? Kindly request to provide suggestions.
Thanks,
Pavithra