Skip to content

Commit e6b9d82

Browse files
committed
Update Recorder Mode
1 parent a61db3a commit e6b9d82

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

seleniumbase/behave/behave_helper.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,18 @@ def generate_gherkin(srt_actions):
259259
sb_actions.append('%s "%s"' % (method, action[1]))
260260
else:
261261
sb_actions.append("%s '%s'" % (method, action[1]))
262+
elif action[0] == "a_url":
263+
method = "Assert URL"
264+
if '"' not in action[1]:
265+
sb_actions.append('%s "%s"' % (method, action[1]))
266+
else:
267+
sb_actions.append("%s '%s'" % (method, action[1]))
268+
elif action[0] == "a_u_c":
269+
method = "Assert URL contains"
270+
if '"' not in action[1]:
271+
sb_actions.append('%s "%s"' % (method, action[1]))
272+
else:
273+
sb_actions.append("%s '%s'" % (method, action[1]))
262274
elif action[0] == "as_df":
263275
method = "Assert downloaded file"
264276
if '"' not in action[1]:

seleniumbase/fixtures/base_case.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4315,6 +4315,8 @@ def __process_recorded_actions(self):
43154315
ext_actions.append("as_lt")
43164316
ext_actions.append("as_ti")
43174317
ext_actions.append("as_tc")
4318+
ext_actions.append("a_url")
4319+
ext_actions.append("a_u_c")
43184320
ext_actions.append("as_df")
43194321
ext_actions.append("do_fi")
43204322
ext_actions.append("as_at")
@@ -4669,6 +4671,18 @@ def __process_recorded_actions(self):
46694671
sb_actions.append('self.%s("%s")' % (method, action[1]))
46704672
else:
46714673
sb_actions.append("self.%s('%s')" % (method, action[1]))
4674+
elif action[0] == "a_url":
4675+
method = "assert_url"
4676+
if '"' not in action[1]:
4677+
sb_actions.append('self.%s("%s")' % (method, action[1]))
4678+
else:
4679+
sb_actions.append("self.%s('%s')" % (method, action[1]))
4680+
elif action[0] == "a_u_c":
4681+
method = "assert_url_contains"
4682+
if '"' not in action[1]:
4683+
sb_actions.append('self.%s("%s")' % (method, action[1]))
4684+
else:
4685+
sb_actions.append("self.%s('%s')" % (method, action[1]))
46724686
elif action[0] == "as_df":
46734687
method = "assert_downloaded_file"
46744688
if '"' not in action[1]:

0 commit comments

Comments
 (0)