wkeeling / selenium-wire

Extends Selenium's Python bindings to give you the ability to inspect requests made by the browser.
MIT License
1.86k stars 240 forks source link

Fix desired capabilities in Undetected Chromedriver for Selenium 4.10 #699

Closed jdholtz closed 5 months ago

jdholtz commented 11 months ago

The desired_capabilities keyword has been deprecated for a while in Selenium and was officially removed in Selenium 4.10. Therefore, using the latest version of Undetected Chromedriver would accept the desired_capabilities keyword, but they wouldn't actually be applied to the webdriver.

This PR applies the capabilities in the manner that is described in Selenium's official docs and allows Selenium-wire to work with the latest versions of both Selenium and Undetected Chromedriver.

The desired_capabilities keyword is used in other places, but I was unsure how to change it to make it compatible for the other drivers. If desired, I can rework this PR to fix all of those keywords (and in turn fix #697), but I'm not sure how to get the options inside some of the constructors (particularly for Remote).

platon023 commented 8 months ago

Go merge this pull!

platon023 commented 8 months ago

@wkeeling