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

driver.requests is empty list with MSEdgedriver

Open TAPringle opened this issue 1 year ago • 0 comments

Hi,

Using MSEdgedriver 119.0.2151.58, driver.requests returns only an empty list after using the click() or get() methods to access a url. I am presently using selenium 4.15.2 and selenium-wire 5.1.0. This functionality works as expected when using chromedriver, while executing the same code (without the Edge-specific things like the port selenium-wire options).

Upon inspecting the objects and looking at the capabilities dict, I noticed a few differences which were unable to be resolved through setting options in EdgeOptions.

# Edge Capabilities where different than Chrome
{
'proxy': {}
}
# Chrome capabilities where different than Edge
{'proxy': {'httpProxy': '<something here>',
'proxyType': 'manual',
'sslProxy': '<something else here>'}}

I have omitted things which are bound to be unique to chrome or edge, but the automatic filling of the 'proxy' item in chrome and not edge feels like to could be the issue? For additional context, both these browsers are managed by an organizational VPN, but chrome still makes its own proxy without issue.

Update It turns out nothing was being returned between uses of the same socket between runs of the script. Rotating the socket to another allowed driver.requests to correctly collect a list of returned requests.

TAPringle avatar Nov 13 '23 20:11 TAPringle