I have been working on getting modal dialog tests to work running from
Vista.

 

As of now, the current working combination is Ruby 1.8.2 -15 and Watir
Gem 1.5.1.1166 and I have made no special changes to either of those.

I am looking for a good test example somewhere. I have got a simple one
to work so far. The modal dialogs I actually have to test for real are
more complex, and in fact involve stacked frames in modal dialogs. 

Here is the script I run as a simple test:

require 'test/unit'
require 'watir'

class ModalDialog < Test::Unit::TestCase
def test_simple_modal_dialog
ie = Watir::IE.start "http://www.webreference.com/js/tips/010814.html"; 
ie.button(:value, 'Push To Create').click_no_wait
ie.modal_dialog.text_field(:name, 'IC_QueryText').set('Modal Dialog')
ie.modal_dialog.button(:name, 'SUBMIT').click

puts 'Check that search results are found:' 
assert(ie.text.include?("Modal Dialog"))
end
end

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to