This is in reference to the solution provided by @lifeiscomplex
However if manually clicked on print from application menu
in FireFox during the page loading process i do get the print dialog:
Could you please advise why am i getting that dialogbox.
I did change the toggle to True before running the script, which shouldn't matter since since its already in profile_options.set_preference("print.printer_Mozilla_Save_to_PDF.print_to_file", True)
:
Edit:
I was able to get the print dialog box to start reappearing by commenting out this line:
profile_options.set_preference("print.always_print_silent", True)
But i am not able to find the file testpage.pdf
which is suppose to be generated.
My system information
----------------------------------------
Platform: Windows
OS: 10
Python: 3.8.8
Selenium: 3.141.0
Firefox: 90.0.2
Geckodriver: 0.29.0
----------------------------------------
CodePudding user response: