Hi,

The app I'm testing has lots of Javascript pop-ups. The method used
for clicking them in the dialog_test.rb unit test works in some cases,
as in:

$ie.link( :text, "Delete contact").click_no_wait
# "click OK or cancel" pop-up appears
assert dialog.exists?
dialog.button('OK').click
# "OK" button on pop-up is successfully clicked

But when I try it on a button in a div, as in the following code, I
get an undefined method error.

# the delete button is in a div
$ie.div(:id, 'divXdatat').button(:index,1).click_no_wait
assert dialog.exists?
dialog.button('OK').click

produces:

NoMethodError: undefined method `eval_in_spawned_process' for
#<Watir::Div:0x2bfff00>
    c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2264:in `click_no_wait'

Does anyone know of a solution or workaround for this? If I change the
'click_no_wait' to a 'click' the pop-up appears but I can't close it.

I've tried Winclicker but it is unreliable.

I'm using Watir version 1.5.0.934.

Thanks for any suggestions,

George

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to