@@ -89,7 +89,7 @@ def __clear_out_old_logs(
89
89
self , archive_past_runs = True , get_log_folder = False
90
90
):
91
91
abs_path = os .path .abspath ("." )
92
- file_path = abs_path + "/%s" % self .LATEST_REPORT_DIR
92
+ file_path = os . path . join ( abs_path , self .LATEST_REPORT_DIR )
93
93
if not os .path .exists (file_path ):
94
94
os .makedirs (file_path )
95
95
@@ -411,9 +411,9 @@ def __process_manual_check_results(self, auto_close_results_page=False):
411
411
self .__add_bad_page_log_file () # Includes successful results
412
412
413
413
log_string = self .__clear_out_old_logs (get_log_folder = True )
414
- log_folder = log_string .split ("/" )[- 1 ]
414
+ log_folder = log_string .split (os . sep )[- 1 ]
415
415
abs_path = os .path .abspath ("." )
416
- file_path = abs_path + "/%s" % self .ARCHIVE_DIR
416
+ file_path = os . path . join ( abs_path , self .ARCHIVE_DIR )
417
417
log_path = os .path .join (file_path , log_folder )
418
418
web_log_path = "file://%s" % log_path
419
419
@@ -496,8 +496,8 @@ def __process_manual_check_results(self, auto_close_results_page=False):
496
496
table_view ,
497
497
)
498
498
results_file = self .__add_results_page (report_html )
499
- archived_results_file = log_path + "/" + self .RESULTS_PAGE
500
- shutil .copyfile (results_file , archived_results_file )
499
+ archived_results_file = os . path . join ( log_path , self .RESULTS_PAGE )
500
+ shutil .copyfile (results_file , os . path . realpath ( archived_results_file ) )
501
501
if self .manual_check_count > 0 :
502
502
print (
503
503
"\n *** The manual test report is located at:\n " + results_file
@@ -509,5 +509,8 @@ def __process_manual_check_results(self, auto_close_results_page=False):
509
509
else :
510
510
# The user can decide when to close the results page
511
511
print ("\n *** Close the html report window to continue ***" )
512
- while len (self .driver .window_handles ):
513
- time .sleep (0.1 )
512
+ try :
513
+ while len (self .driver .window_handles ):
514
+ time .sleep (0.1 )
515
+ except Exception :
516
+ pass
0 commit comments