@@ -240,15 +240,6 @@ def _embed_to_log_as_file(self, path, width):
240240 )
241241
242242 @keyword
243- # def print_page_as_pdf(self, print_options: Optional[PrintOptions]=None,):
244- # def print_page_as_pdf(self, print_options: Optional[Union[PrintOptions, dict]]=None):
245- # def print_page_as_pdf(self, print_options: Union[PrintOptions, dict, None]=None):
246- # """ Print the current page as a PDF
247- #
248- # """
249- # if not print_options:
250- # print_options = PrintOptions()
251- # print_options.page_ranges = ['-']
252243 def print_page_as_pdf (self ,
253244 filename : str = DEFAULT_FILENAME_PDF ,
254245 background : Optional [bool ] = None ,
@@ -314,11 +305,6 @@ def print_page_as_pdf(self,
314305 if shrink_to_fit is not None :
315306 print_options .shrink_to_fit = shrink_to_fit
316307
317- # base64code = self.driver.print_page(print_options)
318- # pdfdata = b64decode(base64code)
319- # with open('test.pdf', mode='wb') as pdf:
320- # pdf.write(pdfdata)
321-
322308 if not self .drivers .current :
323309 self .info ("Cannot print page to pdf because no browser is open." )
324310 return
0 commit comments