Handling 'print' dialog in chrome browser

3,067 views
Skip to first unread message

sree

unread,
Jan 25, 2013, 9:16:19 AM1/25/13
to seleniu...@googlegroups.com
I have  a solutions for handling 'print' dialog. But all solutions work with firefox, but not work with chrome.

I have two solutions 1. using AutoIT tool 2. Robot class
                        i.e Robot r = new Robot();
r.keyPress(KeyEvent.VK_ESCAPE);
r.keyRelease(KeyEvent.VK_ESCAPE);

When i ran above code, 'print' dialog exit in ff, but not in chrome
Reason: Selenium will execute steps after page load finishing. when i click 'print' dialog in chrome it the previous page shows always loading mark as shown in attached files.

I want to handle 'print' dialog in chrome browser.
Please find the attached screen shot for more information on my issue.
Print.jpg

Mark Collin

unread,
Jan 25, 2013, 11:09:13 AM1/25/13
to seleniu...@googlegroups.com
Selenium can't do it.  Your options (as you already know based on your post) are things like AutoIt and Java robot classes.

I would question why you need to test the print dialogue, it's not as if it's going to suddenly stop working or you could fix it if it did.  Sounds like a waste of testing effort to me.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/d8vlsS0fW_4J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

sree

unread,
Jan 28, 2013, 2:42:33 AM1/28/13
to seleniu...@googlegroups.com
No here i am not testing 'print' dialog. In my application when i am click 'print' button it showing 'print' page. just i want to click 'ESC' or close that window.

i don't want to test any thing in the print dialog.

On Friday, January 25, 2013 9:51:30 PM UTC+5:30, Kamau Scott wrote:
IMO Printing should not be an automated task. Even when employers want everything to be automated, you have to sell them on the idea that some things are better handled with a manual test, and then sell them again on the idea that printing is one of those things that can fail just outside of the scope of the program. The testing of printing should end (again IMO) when the dialog is displayed. 

Mark Collin

unread,
Jan 28, 2013, 5:53:54 AM1/28/13
to seleniu...@googlegroups.com
Testing that a print dialogue appears when clicking on a print button *is* testing the print dialogue
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/n-kOK07JP_sJ.

Sri Lakshmi

unread,
Apr 12, 2019, 6:59:27 AM4/12/19
to Selenium Users
Hi Sree,

I am also facing the same issue When I am trying to close the window getting Pop up "Printing in progress please close the print dialogue".
Please help me how you handled this
Reply all
Reply to author
Forward
0 new messages