Stop browser load from selenium webdriver

后端 未结 3 1277
生来不讨喜
生来不讨喜 2020-12-28 22:09

My selenium webdriver goes to a page and waits for that page to finish loading. If 30 seconds pass it times-out and the script fails.

Is there anyway to have the

3条回答
  •  春和景丽
    2020-12-28 22:54

    Try using this:

       driver.manage().timeouts().pageLoadTimeout();
    

    Documentation:
    Page Load Timeout

    Also, as a tip, you cannot access native controls of the browser using Selenium WebDriver. If you want to do that, use tools like Sikuli if you are using Linux or AutoIt for windows.

提交回复
热议问题