Skip to content

Tag: selenium-webdriver

Selenium retry URL when ValueError

How can I retry url from list if ValueError? Error: Or other exceptions. Can use if ValueError then driver.refresh(2wice) but I dont know location in the code: Maximum retry 2 Answer You can put the entire thing in a try/except block and if it encounters a ValueError at some point, you can put the same code u…