So, what\'s I want to do is to run a function on a specific webpage (which is a match with my regex).
Right now I\'m checking it every second and it works, but I\'m
This is how I implemented it eventually. Works well for me:
driver = webdriver.Chrome() wait = WebDriverWait(driver, 5) desired_url = "https://yourpageaddress" def wait_for_correct_current_url(desired_url): wait.until( lambda driver: driver.current_url == desired_url)