selenium-wire icon indicating copy to clipboard operation
selenium-wire copied to clipboard

Page load Strategy not working with SeleniumWire

Open http-samc opened this issue 4 years ago • 0 comments

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.

http-samc avatar Aug 22 '20 18:08 http-samc