@@ -240,15 +240,6 @@ def _embed_to_log_as_file(self, path, width):
240
240
)
241
241
242
242
@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 = ['-']
252
243
def print_page_as_pdf (self ,
253
244
filename : str = DEFAULT_FILENAME_PDF ,
254
245
background : Optional [bool ] = None ,
@@ -314,11 +305,6 @@ def print_page_as_pdf(self,
314
305
if shrink_to_fit is not None :
315
306
print_options .shrink_to_fit = shrink_to_fit
316
307
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
-
322
308
if not self .drivers .current :
323
309
self .info ("Cannot print page to pdf because no browser is open." )
324
310
return
0 commit comments