One way to handle timeouts for a failing expected condition is by passing in a specific timeout value:
browser.wait(EC.stalenessOf(elementThatIsNotStale), 3000, 'Error: Element was found in the dom');
But what if we want to override the implicit timeout when the condition is successful? For example, if we don't want to wait for the default 30 seconds set as the implicit timeout. In such cases, can we provide both the timeout values for success and failure scenarios?
browser.wait(EC.stalenessOf(elementThatIsStale), 3000, 3000, 'Error: Element was found in the dom');
This approach ensures that the check only lasts for 3 seconds before returning results, regardless of whether the condition passes or fails.
Is there a method to override the implicit timeout setting in this context?