# How to handle windows pop ups

**URL:** <https://www.ruby-forum.com/t/how-to-handle-windows-pop-ups/162547>\
**Category:** Ruby\
**Created:** [March 11, 2009, 8:35am UTC](https://www.ruby-forum.com/t/how-to-handle-windows-pop-ups/162547 "2009-03-11T08:35:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shweta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/839c29/32.png) [@shweta](https://www.ruby-forum.com/u/shweta)\
**Post date:** [March 11, 2009, 8:35am UTC](https://www.ruby-forum.com/t/how-to-handle-windows-pop-ups/162547/1 "2009-03-11T08:35:54Z")

</div>

I have a button with name print Site Info after a click off this  
button it opens another window with print dialog there i need to click  
on print button.So i need to know how to handle such windows pop ups i  
used the code something like this: require ‘win32ole’  
wsh = WIN32OLE.new(‘Wscript.Shell’)  
wsh.SendKeys(‘Windows{ENTER}’). but its not working
