@@ -980,7 +980,7 @@ def print_pdf(self, path=None, print_options=None):
980980 # Chrome still does not support headless webdriver print
981981 # but Firefox does.
982982 self .execute_javascript ("window.print();" )
983-
983+
984984 # We need to wait for the file to be available in this case.
985985 if self .page_title ():
986986 self .wait_for_file (default_path , timeout = timeout )
@@ -995,7 +995,7 @@ def print_pdf(self, path=None, print_options=None):
995995 return path
996996 self .wait (2000 )
997997 return default_path
998-
998+
999999 if print_options is None :
10001000 print_options = {
10011001 'landscape' : False ,
@@ -1877,8 +1877,8 @@ def return_last_created_file(self, path=None, file_extension=""):
18771877 str: the path of the last created file
18781878 """
18791879 if not path :
1880- path = self .download_folder_path
1881-
1880+ path = self .download_folder_path
1881+
18821882 files_path = glob .glob (os .path .expanduser (os .path .join (path , f"*{ file_extension } " )))
18831883 last_created_file = max (files_path , key = os .path .getctime )
18841884 return last_created_file
@@ -1894,8 +1894,8 @@ def check_file_count(self, path=None, file_extension=""):
18941894 int: the number of files of the given type
18951895 """
18961896 if not path :
1897- path = self .download_folder_path
1898-
1897+ path = self .download_folder_path
1898+
18991899 files_path = glob .glob (os .path .expanduser (os .path .join (path , f"*{ file_extension } " )))
19001900 return len (files_path )
19011901
@@ -1913,7 +1913,7 @@ def wait_for_new_pdf(self, current_count=0, timeout=60000):
19131913 while pdf_count != current_count + 1 :
19141914 self .wait (2000 )
19151915 pdf_count = self .check_file_count (file_extension = ".pdf" )
1916-
1916+
19171917 wait_time = wait_time + 2000
19181918 if wait_time >= timeout :
1919- break
1919+ break
0 commit comments