Skip to main content
Tweeted twitter.com/#!/StackSQA/status/224407036543250432
edited tags
Link
joshin4colours
  • 2.2k
  • 1
  • 15
  • 28
Source Link
user1411110
  • 957
  • 4
  • 9
  • 20

Rule of thumb for using wait()

A rule of thumb for using wait() would be before navigating to a different page. For Ex :

WebDriverWait(driver,10).until(lambda driver: driver.title.startswith("Submitted!!"))

What would be other such instances where using wait() would be a good coding practice?

I ask because i have experienced that when my test scripts don't work i just stick in a wait() for elements/pages to load . However i don't want to introduce a wait() after every webdriver action because that would increase the test time.

So in your experience , what are the best practices to using wait() ?