Hi,

The web app I'm testing have a text editor (jquery based) which is
created in a DIV section, as part of the tests I am writing I need to
check that it closes when the cancel button is clicked.

I am using FireWatir on a Mac with Firefox 3.6.10

This is a snippet of the code I am trying,

                $log.debug "Check for container"
                myDiv=$browser.div(:class,"ws-dialog ws-editor-dialog 
ui-draggable
ui-resizable")
                assert(myDiv.exists?,"Text editor not displayed")

                $log.debug "Check for main buttons"
                save = $browser.button(:id,"ws-editor-save")
                ok = $browser.button(:id,"ws-editor-ok")
                cancel = $browser.button(:id,"ws-editor-cancel")

                assert(save.exists?,"Save button not found")
                assert(ok.exists?,"Ok button not found")
                assert(cancel.exists?,"Cancel button not found")

                #other checks to go in here

                $log.debug "Close the editor"
                cancel.click

                Watir::Waiter.wait_until {cancel.exists != true}

What happens as it is written above that the wait_until times out, if
I change the line to be,

                Watir::Waiter.wait_until { $browser.button(:id,"ws-
editor-save") != true}

it doesn't time out, is this expected?

Maybe it is a lack of my understanding of WATIR but can anyone explain
why this is the case?

Regards
Alastair

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to