How to close a chrome print window?

108 views
Skip to first unread message

Arthur Ésse

unread,
Oct 7, 2022, 11:25:42 PM10/7/22
to Selenium Users
Hi, guys. My name is Arthur, I'm beginner in Python with Selenium, and beginner in english language too. hahahahhah. Well... I have a silly question. How to close a chrome print window? When I click on in a certain link, a new window opens and a pop-up print raise,  as shown in the attached image. I need close this pop-up, but I can't.

So far I've tried to use the way driver.switch_to_window("window pop up").  I believe that up to this point I am right. Afte I try to use driver.find_element(By.XPATH,"xpath of the button"), but this doesn't works.

Someone has a idea how solution this?

Thanks, guys.

Pop up print.jpg

SuperKevy

unread,
Oct 8, 2022, 1:48:55 PM10/8/22
to Selenium Users
Try playing send_keys with escape to the browser.  

kadambari saran

unread,
Oct 9, 2022, 10:54:29 AM10/9/22
to seleniu...@googlegroups.com
Try Robot class, it interacts with the windows directly.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6705cd28-52e9-45b0-95bb-ebcf2ad5a1ban%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages