The wait command worked. Thanks :)

wait_until didn't worked. it throws the following error
ANS Automation.rb:6: undefined method `wait_until' for main:Object
(NoMethodError)

Do i have to include any other library other than watir and rubygem

On Thu, Sep 23, 2010 at 4:01 PM, Željko Filipin <
[email protected]> wrote:

> On Thu, Sep 23, 2010 at 12:18 PM, Hrishikesh Bose <
> [email protected]> wrote:
> > require "Watir"
>
> Change this to require "watir" (watir instead of Watir), just in case.
>
>
> > ie.frame(:src,"./app").text_field(:id,"c_nameFieldId").set "admin"
> > Unable to locate element, using :id, "c_nameFieldId"
>
> Since it works in IRB but not in a script, my guess is that it is timing
> issue, maybe your script tries to set the text field and the frame is not
> loaded yet.
>
> Try this:
>
> ...
> wait_until {ie.frame(:src,"./app").text_field(:id,"c_nameFieldId").exist?}
>
> ie.frame(:src,"./app").text_field(:id,"c_nameFieldId").set "admin"
> ...
>
> More information:
>
> http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
>
>
>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: [email protected]
> To unsubscribe: 
> [email protected]<watir-general%[email protected]>
>

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to