selenium-wire
selenium-wire copied to clipboard
Page load Strategy not working with SeleniumWire
I'm currently working with a project using Selenium with Chromedriver in Python 3.8 which requires manipulating a page that takes a very long time to load. As such, I'm using the page loading strategy 'eager' options.page_load_strategy = 'eager'
in order to be able to manipulate certain elements of the page before it loads fully. I set up a test that measures the time for an element to be clicked after the browser has been declared. (Effectively measuring how long the page loading is taking to the point where a constant button can be clicked). When I used the regular Selenium Webdriver, running 15 tests got me an average time of 0.7352
seconds. However, when I used the SeleniumWire Webdriver (with the only change being the change in the difference of Webdriver), my load times after 15 tests were on average 4.3745
. These load times were on par as when I ran this test on Selenium Webdriver using the 'normal' (or default) page load strategy which after 15 tests were on average 4.3900
. Thus, I believe that Seleniumwire is not utilizing the page load strategy and I was looking for possible solutions.