One possible way of getting this error message would be if your dialog wasn't really modal.

It's also possible that there is a flaw in the logic of the code that attaches to the modal window.

Can you share the html for page with the btnOpenDialog that launches the modal?

Bret


On 4/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
This email is to be read subject to the disclaimer below.


Hello All,

I've installed version 1.5 of Watir today in order to finally be able to work with modal dialogs. After some fiddling, I've managed to successfully execute the modal dialog unit test, that was provided with the installation. However, when I've tried implementing the modal solution on my site, it failed. My code is bellow, as well as the error I get. Any help would be greatly appreciated.

==============================

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
require 'unittests/setup'
require 'Win32API'

class TC_ModalDialog < Test::Unit::TestCase
include Watir
 
def setup
 
$ie.goto("http://localhost/Test/")
$ie.button(:name, "btnOpenDialog").click

end
 
def test_modal_use_case

modal = $ie.attach_modal('Notes')

......
       
end

end

==============================

1) Error:
test_modal_use_case(TC_ModalDialog):
RuntimeError: Unable to attach to Modal Window Notes
    c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1306:in `attach_modal'
    modal_dialog_test.rb:40:in `test_modal_use_case'

==============================

Best Regards

Leon


--------------------
NOTICE - This communication contains information which is confidential and the copyright of Ernst & Young or a third party.

If you are not the intended recipient of this communication please delete and destroy all copies and telephone Ernst & Young on 1800 655 717 immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the authority of Ernst & Young.

Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Ernst & Young.

Except as required at law, Ernst & Young does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.

Liability limited by a scheme approved under Professional Standards Legislation.
--------------------


If this communication is a "commercial electronic message" (as defined in the Spam Act 2003) and you do not wish to receive communications such as this, please forward this communication to [EMAIL PROTECTED]

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


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

Reply via email to