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
Post a Comment