Update options

This commit is contained in:
Michael Mintz 2022-12-01 16:10:12 -05:00
parent c47cf20b29
commit 5d80af5286
4 changed files with 14 additions and 8 deletions

View File

@ -660,8 +660,8 @@ def get_configured_sb(context):
if low_key in ["external-pdf", "external_pdf"]:
sb.external_pdf = True
continue
# Handle: -D remote-debug / remote_debug
if low_key in ["remote-debug", "remote_debug"]:
# Handle: -D remote-debug / remote_debug / remote-debugger
if low_key in ["remote-debug", "remote_debug", "remote-debugger"]:
sb.remote_debug = True
continue
# Handle: -D settings=FILE / settings-file=FILE / settings_file=FILE

View File

@ -640,7 +640,7 @@ def _set_chrome_options(
# Opera Chromium only!
chrome_options.add_argument("--allow-elevated-browser")
if remote_debug:
# To access the Remote Debugger, go to: http://localhost:9222
# To access the Debugger, go to: chrome://inspect/#devices
# while a Chromium driver is running.
# Info: https://chromedevtools.github.io/devtools-protocol/
chrome_options.add_argument("--remote-debugging-port=9222")
@ -2131,7 +2131,7 @@ def get_local_driver(
if "linux" in PLATFORM or not is_using_uc(undetectable, browser_name):
edge_options.add_argument("--no-sandbox")
if remote_debug:
# To access the Remote Debugger, go to: http://localhost:9222
# To access the Debugger, go to: edge://inspect/#devices
# while a Chromium driver is running.
# Info: https://chromedevtools.github.io/devtools-protocol/
edge_options.add_argument("--remote-debugging-port=9222")

View File

@ -946,12 +946,15 @@ def pytest_addoption(parser):
parser.addoption(
"--remote_debug",
"--remote-debug",
"--remote-debugger",
"--remote_debugger",
action="store_true",
dest="remote_debug",
default=False,
help="""This enables Chromium's remote debugger.
help="""This syncs the browser to Chromium's remote debugger.
To access the remote debugging interface, go to:
http://localhost:9222 while Chromedriver is running.
chrome://inspect/#devices while tests are running.
The previous URL was at: http://localhost:9222/
Info: chromedevtools.github.io/devtools-protocol/""",
)
parser.addoption(

View File

@ -704,12 +704,15 @@ class SeleniumBrowser(Plugin):
parser.add_option(
"--remote_debug",
"--remote-debug",
"--remote-debugger",
"--remote_debugger",
action="store_true",
dest="remote_debug",
default=False,
help="""This enables Chromium's remote debugger.
help="""This syncs the browser to Chromium's remote debugger.
To access the remote debugging interface, go to:
http://localhost:9222 while Chromedriver is running.
chrome://inspect/#devices while tests are running.
The previous URL was at: http://localhost:9222/
Info: chromedevtools.github.io/devtools-protocol/""",
)
parser.add_option(