Skip to content

Commit 4a17595

Browse files
committed
Print Behave-BDD output for that Recorder GUI Mode
1 parent 5d8174b commit 4a17595

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

seleniumbase/console_scripts/sb_mkrec.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,22 @@ def main():
207207
"" + c1 + file_name + cr + "\n"
208208
)
209209
print(success)
210+
if rec_behave:
211+
recorded_filename = file_name[:-3] + "_rec.feature"
212+
recordings_dir = os.path.join(dir_name, "recordings")
213+
features_dir = os.path.join(recordings_dir, "features")
214+
recorded_file = os.path.join(features_dir, recorded_filename)
215+
if " " not in recorded_file:
216+
os.system("sbase print %s -n" % recorded_file)
217+
elif '"' not in recorded_file:
218+
os.system('sbase print "%s" -n' % recorded_file)
219+
else:
220+
os.system("sbase print '%s' -n" % recorded_file)
221+
success = (
222+
"\n" + c2 + "***" + cr + " BEHAVE RECORDING at: "
223+
"" + c1 + os.path.relpath(recorded_file) + cr + "\n"
224+
)
225+
print(success)
210226

211227

212228
if __name__ == "__main__":

0 commit comments

Comments
 (0)