pythonseleniumsplinter

Python Stop Splinter from Waiting for Everything to Load


Right now Splinter will load for 20 seconds on pages with lots of ads and tracking built in

browser.visit("https://www.website.com")

I know that selenium allows for

caps = DesiredCapabilities().FIREFOX
    caps["pageLoadStrategy"] = "eager"

But Splinter doesn't accept these parameters.


Solution

  • You have to pass the capabilities when initiate the browser

    browser = Browser('firefox', capabilities={'pageLoadStrategy': True})
    browser.visit("https://www.website.com")