Make headless browser stop loading page

前端 未结 4 1449
逝去的感伤
逝去的感伤 2021-02-15 12:29

I am using the watir-webdriver ruby gem. It starts the browser (Chrome) and begins to load a page. The page is loading too slowly, and watir-webdriver raises a timeout error. Ho

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-15 12:50

    I have had the problem of timeouts as well. My understanding from online research is that after Selenium WebDriver encounters a timeout, it gets into bad shape and misbehaves (multithreading issue). I have followed the advices found here:

    https://github.com/watir/watir-webdriver/issues/137

    I implemented active killing (instead of browser.close) and restarting of the Watir::Browser after any exception rescue.

提交回复
热议问题