mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

PrintParameter not working in print webdriver api #2106

Closed xuing closed 1 year ago

xuing commented 1 year ago

System

Testcase

any website with backgroud,

Describe

I use the following code to print the web page as a PDF, but without the background

            print_options = PrintOptions()
            print_options.background = True
            print_options.page_size = 'A4'
            print_options.landscape = False
            print_options.scale = 1
            print_options.shrink_to_fit = True
            pdf_data = driver.print_page(print_options)

image

I also use geckodriver directly, but also no backgroud. image

whimboo commented 1 year ago

This was fixed in Firefox 113. Please see issue #2001.