Open pedrofnts opened 11 months ago
The linked PR will not fix this issue in its current state. More work would need to be done to make a fix for this possible (if desired by wkeeling).
Bump.
I'm running into the same issue, a fix would be greatly appreciated.
(Just to clarify: I'm also trying to use webdriver.Remote
, and getting the same error message regarding desidered_capabilities even though I haven't passed it as an argument.)
Another bump
Error:
TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities'
Code (no clue if it would work anyway, working on it):
from seleniumwire import webdriver
options = {
'proxy': {
'http': the_proxy_addr,
'https': the_proxy_addr,
# 'no_proxy': 'localhost,127.0.0.1', # excludes
'custom_authorization': f'{username} {password}'
}
}
driver = webdriver.Remote(
command_executor= "http://172.17.0.2:4444/wd/hub",
seleniumwire_options=options
)
@pedrofnts the issue is happening because desired_capabilities
was deprecated as of 4.10.0 and I'm assuming seleniumwire uses it under the hood in some way.
You can downgrade which I might try but I'm not a huge fan of that solution.
Update: I tried it on 4.9.1 and it still didn't work :(
If I figure anything else out I'll share with the class
@surfingdoggo test this:
For old selenium (< 4.10): dc = DesiredCapabilities.CHROME.copy() dc["goog:loggingPrefs"] = {"browser":"INFO"}
For "new" selenium (>=4.10), you need to place it using options.set_capability: options = webdriver.ChromeOptions() options.set_capability("goog:loggingPrefs", {browser: "INFO"})
https://github.com/wkeeling/selenium-wire/issues/687#issuecomment-1732311567
@surfingdoggo test this:
For old selenium (< 4.10): dc = DesiredCapabilities.CHROME.copy() dc["goog:loggingPrefs"] = {"browser":"INFO"} For "new" selenium (>=4.10), you need to place it using options.set_capability: options = webdriver.ChromeOptions() options.set_capability("goog:loggingPrefs", {browser: "INFO"})
https://github.com/wkeeling/selenium-wire/issues/687#issuecomment-1732311567
This does not work, I'm afraid. The issue persists.
Hello, I'm trying to use webdriver.Remote with selenium-wire to create an instance of browserless, but I keep getting this error
_TypeError: WebDriver.init() got an unexpected keyword argument 'desiredcapabilities'
Here's my code:
I'm not passing desidered_capabilities. Why this is happening?