Add option to use Undetectable Mode with Recorder Mode
This commit is contained in:
parent
349d6bfa80
commit
c000e326b8
|
@ -386,6 +386,7 @@ sbase codegen new_test.py --url=wikipedia.org
|
|||
``--url=URL`` (Sets the initial start page URL.)
|
||||
``--edge`` (Use Edge browser instead of Chrome.)
|
||||
``--gui`` / ``--headed`` (Use headed mode on Linux.)
|
||||
``--uc`` / ``--undetected`` (Use undetectable mode.)
|
||||
``--overwrite`` (Overwrite file when it exists.)
|
||||
``--behave`` (Also output Behave/Gherkin files.)
|
||||
|
||||
|
@ -404,6 +405,7 @@ sbase recorder [OPTIONS]
|
|||
|
||||
* Options:
|
||||
|
||||
``--uc`` / ``--undetected`` (Use undetectable mode.)
|
||||
``--behave`` (Also output Behave/Gherkin files.)
|
||||
|
||||
* Output:
|
||||
|
|
|
@ -299,6 +299,7 @@ def show_mkrec_usage():
|
|||
print(" --url=URL (Sets the initial start page URL.)")
|
||||
print(" --edge (Use Edge browser instead of Chrome.)")
|
||||
print(" --gui / --headed (Use headed mode on Linux.)")
|
||||
print(" --uc / --undetected (Use undetectable mode.)")
|
||||
print(" --overwrite (Overwrite file when it exists.)")
|
||||
print(" --behave (Also output Behave/Gherkin files.)")
|
||||
print(" Output:")
|
||||
|
@ -324,6 +325,7 @@ def show_codegen_usage():
|
|||
print(" --url=URL (Sets the initial start page URL.)")
|
||||
print(" --edge (Use Edge browser instead of Chrome.)")
|
||||
print(" --gui / --headed (Use headed mode on Linux.)")
|
||||
print(" --uc / --undetected (Use undetectable mode.)")
|
||||
print(" --overwrite (Overwrite file when it exists.)")
|
||||
print(" --behave (Also output Behave/Gherkin files.)")
|
||||
print(" Output:")
|
||||
|
@ -343,6 +345,7 @@ def show_recorder_usage():
|
|||
print(" seleniumbase recorder [OPTIONS]")
|
||||
print(" OR: sbase recorder [OPTIONS]")
|
||||
print(" Options:")
|
||||
print(" --uc / --undetected (Use undetectable mode.)")
|
||||
print(" --behave (Also output Behave/Gherkin files.)")
|
||||
print(" Output:")
|
||||
print(" Launches the SeleniumBase Recorder Desktop App.")
|
||||
|
|
|
@ -22,6 +22,7 @@ Options:
|
|||
--url=URL (Sets the initial start page URL.)
|
||||
--edge (Use Edge browser instead of Chrome.)
|
||||
--gui / --headed (Use headed mode on Linux.)
|
||||
--uc / --undetected (Use undetectable mode.)
|
||||
--overwrite (Overwrite file when it exists.)
|
||||
--behave (Also output Behave/Gherkin files.)
|
||||
|
||||
|
@ -49,6 +50,7 @@ def invalid_run_command(msg=None):
|
|||
exp += " --url=URL (Sets the initial start page URL.)\n"
|
||||
exp += " --edge (Use Edge browser instead of Chrome.)\n"
|
||||
exp += " --gui / --headed (Use headed mode on Linux.)\n"
|
||||
exp += " --uc / --undetected (Use undetectable mode.)\n"
|
||||
exp += " --overwrite (Overwrite file when it exists.)\n"
|
||||
exp += " --behave (Also output Behave/Gherkin files.)\n"
|
||||
exp += " Output:\n"
|
||||
|
@ -87,6 +89,7 @@ def main():
|
|||
error_msg = None
|
||||
invalid_cmd = None
|
||||
use_edge = False
|
||||
use_uc = False
|
||||
start_page = None
|
||||
next_is_url = False
|
||||
use_colors = True
|
||||
|
@ -138,6 +141,8 @@ def main():
|
|||
elif option.lower() in ("--gui", "--headed"):
|
||||
if "linux" in platform:
|
||||
force_gui = True
|
||||
elif option.lower() in ("--uc", "--undetected", "--undetectable"):
|
||||
use_uc = True
|
||||
elif option.lower() in ("--rec-behave", "--behave", "--gherkin"):
|
||||
rec_behave = True
|
||||
elif option.lower().startswith("--url="):
|
||||
|
@ -186,6 +191,8 @@ def main():
|
|||
run_cmd += " --edge"
|
||||
if force_gui:
|
||||
run_cmd += " --gui"
|
||||
if use_uc:
|
||||
run_cmd += " --uc"
|
||||
if rec_behave:
|
||||
run_cmd += " --rec-behave"
|
||||
print(run_cmd)
|
||||
|
|
|
@ -7,6 +7,7 @@ Usage:
|
|||
sbase recorder [OPTIONS]
|
||||
|
||||
Options:
|
||||
--uc / --undetected (Use undetectable mode.)
|
||||
--behave (Also output Behave/Gherkin files.)
|
||||
|
||||
Output:
|
||||
|
@ -132,6 +133,12 @@ def do_recording(file_name, url, overwrite_enabled, use_chrome, window):
|
|||
command = "sbase mkrec %s --url=%s --gui" % (file_name, url)
|
||||
if not use_chrome:
|
||||
command += " --edge"
|
||||
if (
|
||||
"--uc" in command_args
|
||||
or "--undetected" in command_args
|
||||
or "--undetectable" in command_args
|
||||
):
|
||||
command += " --uc"
|
||||
command += add_on
|
||||
poll = None
|
||||
if sb_config.rec_subprocess_used:
|
||||
|
|
Loading…
Reference in New Issue