I'm trying to run seleniumwire driver in the remote mode. The issue is that I don't quite understand some instructions from the official docs: https://pypi.org/project/selenium-wire/#all-options
options = {
'addr': 'hostname_or_ip' # Address of the machine running Selenium Wire. Explicitly use 127.0.0.1 rather than localhost if remote session is running locally.
}
driver = webdriver.Remote(
command_executor='http://www.example.com',
seleniumwire_options=options
)
Where do I find the hostname of IP? At first I thought it might be the address I use for connecting to the selenium grid, something like this 'http://hub.selenium-grid:4444/wd/hub'. But it raised an error:
E seleniumwire.thirdparty.mitmproxy.exceptions.ServerException: Error starting proxy server: gaierror(-2, 'Name or service not known')
So, if it's not the correct 'addr', what should I use instead?