I am using Selenoid on a dedicated computer to run browsers.
The connection is as follows:
from seleniumwire import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('disable-infobars')
chrome_options.add_argument('--disable-extensions')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--ignore-certificate-errors')
chrome_options.add_experimental_option('prefs', prefs)
capabilities = {
"browserName": "chrome",
"selenoid:options": {
"enableVNC": True
}
}
capabilities.update(chrome_options.to_capabilities())
driver = webdriver.Remote(
command_executor='http://<remote_ip>:4444/wd/hub',
desired_capabilities=capabilities,
seleniumwire_options={
'auto_config': False,
'addr': '0.0.0.0'
}
)
The connection is ok, browser control works too, but when I want to get the list of requests it is empty:
driver.get('https://google.com')
print(driver.requests)
# []
Try the following patch:
You should get some result similar to this: