Remote debugging with headless Chrome
Add the following arguments to chrome options:
options = webdriver.ChromeOptions()
options.add_argument("headless")
options.add_argument("remote-debugging-address=0.0.0.0")
options.add_argument("remote-debugging-port=9222")
wd = webdriver.Chrome(chrome_options=options)
- start Chrome and navigate to
chrome://inspectpage - make sure
Discover network targetsis checked - click
Configurebutton next to the previous option - add a new target, for example (must be an IP address): 10.214.36.58:9222
- the remote browser should be automatically discovered and appear in
Remote targetlist - click
Inspect