Search code examples
pythonseleniumselenium-webdriverwebdriverdocument-ready

Is it possible to resume Selenium code when the browser lands on a certain url?


Simple question, is it possible to resume selenium code the moment the browser lands on a certain URL?


Solution

  • import sys
    
    WebDriverWait(driver, sys.maxsize - 1).until(lambda s: s.current_url == "https://www.myurl.com/")