When you say "popup" do you mean a Javascript Alert?

If so, in the latest versions of watir-webdriver I believe that's as 
easy as:
puts $browser.alert.text
$browser.alert.close

-- 
Posted via http://www.ruby-forum.com/.