How to save as PDF on Chrome using Selenium

in selenium
selenium Tutorials
1 Answers to this question

You will need to disable the Chrome PDF plugin and download the print window with desired compatibilities.

DesiredCapabilities cap =;




cap.setCapability("plugins.plugins_disabled","Chrome PDF Viewer");

WebDriver driver = new ChromeDriver(cap);

You can also add the options.AddArgument(“---printing”); to automatically click the print option.

If you want to unleash your potential in this competitive field, please visit the Selenium Certification Training page for more information, where you can find the    Selenium Tutorial    and    Selenium Interview Questions FAQ's and answers    as well.

For more updates on the latest courses stay tuned to HKR Trainings.

To Top