Display wait time WebDriverWait using selenium python -


i'm interesting in getting time waited until object clickable on page. once element clickable metric displayed showing how long took element become active.

try:     webdriverwait(self.driver,  10, poll_frequency=0.5).until( lambda d: self.submit_button) except timeoutexception:     assert false 

above code using poll element, i'm looking way time waited metric out.

any suggestions ?

you not exact time, because have polling every n seconds , overall wait. can have average approximation. it's not selenium purposes, can use import time, example.

  • just before executing command add: start = time.time()

  • and right after command: end = time.time()

  • then, needed value print end - start


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -