I Need to handle Print Preview App Dialog Box. But I am not able to do that with Selenium C#. How can I do it? The Print Preview opens in another tab

Viewed 22

I am trying to handle a Print Dialog in Chrome. But, Selenium is not able to interacts with it. Is it possible that I click on the Print Hyperlink, instead of opening the new tab with Print Dialog box, it Saves the next page content as PDF with required settings?

Or if I can somehow interact with the Print Dialog in Selenium or C# ?enter image description here

1 Answers

You can use Action class in selenium to send keys to browser. If you want to cancel then send "Esc" else send "Enter" to save. After pressing save, save as dialog will appear which you can handle using AutoIt.

Related