Skip to content

Sometimes the code run too fast and sometimes my website doesnt finish to refresh itself therefore the code failes #2153

Answered by mdmintz
elnatan2604 asked this question in Q&A
Discussion options

You must be logged in to vote

self.wait_for_element_clickable() waits for element.is_displayed() and element.is_enabled() (from the raw selenium built-in methods). It's not necessarily enough, depending on what you're actually clicking on, for the website you're using. You may need to wait for another element to be visible (for example) or something else. (Eg. self.wait_for_element_visible(selector))

When you're not sure what else you need to wait on, that's when you may be forced to use time.sleep(seconds) / self.sleep(seconds) in the meantime until you know exactly what you need to wait for.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants