# Retrieve text from popup

**URL:** <https://www.ruby-forum.com/t/retrieve-text-from-popup/175205>\
**Category:** Rails\
**Created:** [September 9, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/retrieve-text-from-popup/175205 "2009-09-09T17:56:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [September 9, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/retrieve-text-from-popup/175205/1 "2009-09-09T17:56:00Z")

</div>

I am using the following code to click on a popup, and would like to be  
able to retrieve the text which is displayed in the popup. Does anyone  
have any suggestions as to how to do this?

def startClicker(ie, button , waitTime = 4)  
w = WinClicker.new  
longName = ie.dir.gsub("/" , “\” )  
shortName = w.getShortFileName(longName)  
c = "start ruby #{shortName }\clickJSDialog.rb #{button } #{  
waitTime} "  
puts “Starting #{c}”  
w.winsystem©  
w=nil  
end
