Skip to content

Commit c3d90e5

Browse files
committed
Cleanup of commented out code
1 parent 22d04d1 commit c3d90e5

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

atest/acceptance/keywords/print_page.robot

-10
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,3 @@ Print With Full Options
2222
Print Page As PDF page_ranges=['1'] background=${False} shrink_to_fit=${False} orientation=portrait
2323
... margin_top=${0.5} margin_left=${1.5} margin_bottom=${0.5} margin_right=${1.5}
2424
... page_height=${35.56} page_width=${21.59}
25-
26-
#Provide Print Options From Module
27-
# # ${print_options}= Evaluate sys.modules['selenium.webdriver'].common.print_page_options() sys, selenium.webdriver
28-
# ${print_options}= Evaluate selenium.webdriver.common.print_page_options.PrintOptions()
29-
# # Set To Dictionary ${print_options} scale 0.5
30-
# # Evaluate ${print_options}.scale=0.5
31-
# # Set Variable ${print_options.scale} 0.5
32-
# # Evaluate ${print_options.scale}=0.5
33-
# Evaluate setattr($print_options, 'scale', 0.5)
34-
# Print Page As PDF ${print_options}

src/SeleniumLibrary/keywords/screenshot.py

-14
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)