I'm using WebdriverIO for automation and I'm finding this weird behavior w.r.t waiting in dynamic wait calls.
On the framework I have only set the following timeouts in wdio-conf
waitforTimeout = 60000
connectionRetryTimeout = 120000 &
timeout under mochaOpts as 600000
But the following code is showing weeird behavior
async clearNotifications {
console.log(new Date().toLocaleString());
const newButton = await $('//*[@title="Neww"]').isClickable();
console.log(newButton);
await driver.pause(5000);
console.log(new Date().toLocaleString());
}
The output shows
3/30/2023, 12:24:59 AM
false
3/30/2023, 12:27:05 AM
WebDriverIo took 2 minutes to say that the element is not clickable as the element does not exist in the DOM.
As per API documentation, waitforTimeout is only applicable for waitFor* commands. and findElement and isClickable should immeditely return
They why the wait time of 2 minutes?