I would like to ask how to solve time delays in testing. I now have a script like this:
WebDriverWait (self.browser, 20) .until (EC.element_to_be_clickable ((By.ID, "Login1_LoginButton"))).
sleep (5) \ t
self.assertEqual ("Page 1 | Hotline", self.browser.title)
print ("Login OK")
It is a login to the application when the page name is checked after login. Due to the speed of the Internet it is not always optimal and sometimes the test fails. It would be better to put a condition there that would wait for the application to log in and then check. Also giving there just sleep (5) I find the wrong solution. Some idea?