Skip to content

Commit 25a725d

Browse files
committed
Fix a bug with Recorder Mode
1 parent 89678be commit 25a725d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

seleniumbase/console_scripts/sb_mkrec.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,14 @@ def main():
188188
run_cmd = "%s -m pytest %s --rec -q -s --url=%s" % (
189189
sys.executable, file_name, start_page
190190
)
191+
if '"' not in start_page:
192+
run_cmd = '%s -m pytest %s --rec -q -s --url="%s"' % (
193+
sys.executable, file_name, start_page
194+
)
195+
elif "'" not in start_page:
196+
run_cmd = "%s -m pytest %s --rec -q -s --url='%s'" % (
197+
sys.executable, file_name, start_page
198+
)
191199
if use_edge:
192200
run_cmd += " --edge"
193201
if force_gui:

seleniumbase/console_scripts/sb_recorder.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ def do_recording(file_name, url, overwrite_enabled, use_chrome, window):
134134
"%s -m seleniumbase mkrec %s --url=%s --gui"
135135
% (sys.executable, file_name, url)
136136
)
137+
if '"' not in url:
138+
command = (
139+
'%s -m seleniumbase mkrec %s --url="%s" --gui'
140+
% (sys.executable, file_name, url)
141+
)
142+
elif "'" not in url:
143+
command = (
144+
"%s -m seleniumbase mkrec %s --url='%s' --gui"
145+
% (sys.executable, file_name, url)
146+
)
137147
if not use_chrome:
138148
command += " --edge"
139149
if (

0 commit comments

Comments
 (0)