python - Try statement inside loop not being executed after first pass when exception thrown -
I am grabbing a selenium with a URL that is sometimes crypt that the page does not load, so I try the Selenium again in the URL, like a user who click on a hung up link for the first time, so they click it again.
My problem occurs when "driver.get" does not work first, it throws timeout excuses, goes back to the top of the loop, and then instead of "try" it through the loop Runs out and loops out of the loop. Can someone shed some light on this? Please and thank you. :)
Some extra notes: I get only "timed out" prints, so it seems that the statement to be tried is being done only once. I have all five numbers printed from my iterator.
for driver2.set_page_load_timeout (6) k (0, 5, +1): print k Try: Timeout expiration except driver2.get (url): with the above question Nothing is wrong "print out"
The only fact is that I "driver .get () ", which apparently succeeded after every passing.
Comments
Post a Comment