Espresso WebdriverIO setImplicitTimeout not working
See original GitHub issueI have Appium v1.16.0 , EspressoDriver (v1.18.0) , “webdriverio”: “^5.18.4”
Trying to add Implicit time out.
const driver = await wdio.remote(opts);
await driver.setImplicitTimeout(30000);
const logIn = await driver.$("//*[@text='LOG IN']");
await logIn.touchAction('tap');
on login button tap I am making API call and expected to see error field to be displayed.
await driver.setImplicitTimeout(40000);
const ErrorUserserNameField = await driver.$("~ErrorUserserNameField");
expect(await ErrorUserserNameField.isDisplayed()).toBe(true);
After tap next command to find ErrorUserserNameField is getting fire immediately and no such element error shown. Ideally it should wait until error label to be shown up on screen.
Logs:
"value":{"error":"no such element","message":"Could not find element with strategy ACCESSIBILITY_ID and selector ErrorUserserNameField","stacktrace":"io.appium.espressoserver.lib.handlers.exceptions.NoSuchElementException: Could not find element with strategy ACCESSIBILITY_ID and selector ErrorUserserNameField\n\tat io.appium.espressoserver.lib.handlers.FindElement.handleInternal(Fin ....
I have tried in multiple devices and emulators but same error. Tried with UiAutomator2 working fine.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
I wonder if https://github.com/AppiumTestDistribution/appium-wait-plugin is good for the purpose.
The original intention in wait for element thing by set timeout in UIA2 was UIA framework by Google did not have any feature to wait an element present as the Espresso framework had. It is different from general wait for an element in Selenium’s client-side implementation like WebDriverWait in Python. The wait plugin does the behavior as appium server, so it seems like the plugin is the more proper one for your intention.
cc @saikrishna321 @SrinivasanTarget
Hi @KazuCocoa ,
Same here, I’m testing 2.10.0 with the same behavior. When the element exists the request finishes very quickly, but when it doesn’t exists, the request is frozen during around 30000 ms. Could it be possible to set another default value even using capabilities and allow developers to do a “wait and retry” system on our projects ?