Skip to content

Commit f18213e

Browse files
committed
Add way to hide file-save output for Presenter / ChartMaker
1 parent 0ea82ce commit f18213e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def __initialize_variables(self):
159159
self._language = "English"
160160
self._presentation_slides = {}
161161
self._presentation_transition = {}
162+
self._output_file_saves = True # For Presenter / ChartMaker
162163
self._rec_overrides_switch = True # Recorder-Mode uses set_c vs switch
163164
self._sb_test_identifier = None
164165
self._html_report_extra = [] # (Used by pytest_plugin.py)
@@ -11187,7 +11188,8 @@ def save_presentation(
1118711188
out_file = codecs.open(file_path, "w+", encoding="utf-8")
1118811189
out_file.writelines(the_html)
1118911190
out_file.close()
11190-
print("\n>>> [%s] was saved!\n" % file_path)
11191+
if self._output_file_saves:
11192+
print("\n>>> [%s] was saved!\n" % file_path)
1119111193
return file_path
1119211194

1119311195
def begin_presentation(
@@ -11885,7 +11887,8 @@ def save_chart(self, chart_name=None, filename=None, folder=None):
1188511887
out_file = codecs.open(file_path, "w+", encoding="utf-8")
1188611888
out_file.writelines(the_html)
1188711889
out_file.close()
11888-
print("\n>>> [%s] was saved!" % file_path)
11890+
if self._output_file_saves:
11891+
print("\n>>> [%s] was saved!" % file_path)
1188911892
return file_path
1189011893

1189111894
def display_chart(self, chart_name=None, filename=None, interval=0):

0 commit comments

Comments
 (0)