Closed lossness closed 4 years ago
Thanks - I'll take a look.
Looking at verbose logging, there is a difference in the remote connection POST:
with debugger address enabled:
INFO:seleniumwire.proxy.client:Created proxy listening on 127.0.0.1:60742
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:60743/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "proxy": {"proxyType": "manual", "httpProxy": "127.0.0.1:60742", "sslProxy": "127.0.0.1:60742", "noProxy": ""}, "acceptInsecureCerts": true, "goog:chromeOptions": {"extensions": [], "args": [], "debuggerAddress": "127.0.0.1:9222"}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "proxy": {"proxyType": "manual", "httpProxy": "127.0.0.1:60742",
"sslProxy": "127.0.0.1:60742", "noProxy": ""}, "acceptInsecureCerts": true, "goog:chromeOptions": {"extensions": [], "args": [], "debuggerAddress": "127.0.0.1:9222"}}}
without debugger address:
INFO:seleniumwire.proxy.client:Created proxy listening on 127.0.0.1:61270
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:61271/session {"capabilities": {"firstMatch1:61270", "noProxy": ""}, "acceptInsecureCerts": true}}, "desiredCapabilities": {"browserName": "chrome", "version" true}}
Let me know if there's anything I can assist with.
Sorry for the delay in coming back on this.
The debugger_address
attribute is used to set the address of a Chrome instance that the webdriver should connect to. If there is no Chrome instance listening at that address, then the webdriver will sit and wait. This is the same when using Selenium on it's own, so it is not specific to Selenium Wire.
For the debugger_address
to work you first need to manually start a Chrome instance that is listening on the debugger port:
chrome.exe -remote-debugging-port=9222
Now you can start Selenium Wire (or Selenium) using:
CHROME_OPTIONS.debugger_address = "127.0.0.1:9222"
OS: Windows 10 1909 CHROME DRIVER: 80 Series CHROME: 81.0.4044.138
using selenium.webdriver.chrome.options Options() and setting the attribute debugger_address "127.0.0.1:9222" breaks capturing requests.
I don't see any threads popping up in the proxy instance on visual studio code debugger either.
When not using debugger address it functions correctly and fills the list.