Closed RobertMcCoy closed 6 years ago
this is as designed for explicit waits. if you want a global timer, use implicit waits.
@jlipps Are you referring to the setImplicitWaitTimeout
set on the driver? Setting this doesn't seem to change how long waitForElementAccessibilityId
waits for an element, and will just timeout after a second. Maybe I am misunderstanding the API usage, here is an example of the code being used:
const driver = wd.promiseChainRemote(serverConfig);
const client = driver.init(iosConfig).setImplicitWaitTimeout(5000);
// ...
await client
.waitForElementByAccessibilityId("someElementId")
.click();
Our application uses a loading alert for most screens, and some screens may take upwards of a second or two to load, so it doesn't appear to respect the 5000 in some cases.
setting the implicit wait timeout changes the server's behavior. just use a regular find element command .elementByAccessibilityId
and the server will wait for you.
When testing it would be nice to be able to globally set the waitFor timeout rather than needing to make it an argument to every single call to
waitFor
.Does this functionality exist and I am overlooking it, or is this a feature that needs added? In the
waitFor
command in the source it looks like opts.timeout needs to come from thefargs
.