Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 554 Bytes

no-browser-sleep.md

File metadata and controls

22 lines (15 loc) · 554 Bytes

Discourage the use of browser.sleep()

Ensure browser.sleep() is not used.

Rule details

browser.sleep() usage is usually considered a bad practice and an Explicit Wait via the browser.wait() is suggested to be used instead. This rule would issue a warning if browser.sleep() is used.

👎 The following patterns are considered warnings:

browser.sleep(10);
browser.sleep(10000);

👍 The following patterns are not warnings:

SomeObject.sleep(10);
browser.wait(EC.visibilityOf(elm), 5000, "Message");