@@ -89,7 +89,7 @@ def __clear_out_old_logs(
8989 self , archive_past_runs = True , get_log_folder = False
9090 ):
9191 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 )
9393 if not os .path .exists (file_path ):
9494 os .makedirs (file_path )
9595
@@ -411,9 +411,9 @@ def __process_manual_check_results(self, auto_close_results_page=False):
411411 self .__add_bad_page_log_file () # Includes successful results
412412
413413 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 ]
415415 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 )
417417 log_path = os .path .join (file_path , log_folder )
418418 web_log_path = "file://%s" % log_path
419419
@@ -496,8 +496,8 @@ def __process_manual_check_results(self, auto_close_results_page=False):
496496 table_view ,
497497 )
498498 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 ) )
501501 if self .manual_check_count > 0 :
502502 print (
503503 "\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):
509509 else :
510510 # The user can decide when to close the results page
511511 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