Likely the timeout it too short
Add this prior

@b.button(:id => 'exitActionButton').wait_until_present(120)    # up to 3 
minutes
@b.button(:id => 'exitActionButton').click

Or use another verification point with the .wait_until_present(nSecs)   

On Tuesday, January 19, 2016 at 5:41:27 PM UTC-6, Bhaskar Rai wrote:
>
>
> Hi,
> I am new to watir. I am trying to write a script to automate web testing 
> at my work. I would appreciate if anyone can help me out.
>
> I am getting time out error(NOT Always) when i execute my script. The 
> script runs successfully sometimes and it does not run successfully 
> sometimes.
>
>
> The script is very simple:-
>
> @b.checkbox(:value => '-1') .click 
>    @b.link(:class => 'btnView').click
> #After this step the scripts gets stuck
>
>         @b.button(:id => 'exitActionButton').when_present.click
>         #@b.button(:id => 'exitActionButton').click (#i have tried this 
> too. It will give me same issue as well)
>
> Ruby version: 1.9
> watir classic
>
> Following is the error message
>
> /ruby/gems/1.9.1/gems/watir-classic-4.2.0/lib/watir-classic/browser.rb:600:in 
> `sleep': execution expired (Timeout::Error)
> uby/gems/1.9.1/gems/watir-classic-4.2.0/lib/watir-classic/browser.rb:600:in 
> `block in wait'
> /ruby/gems/1.9.1/gems/watir-classic-4.2.0/lib/watir-classic/browser.rb:597:in 
> `wait'
> /ruby/gems/1.9.1/gems/watir-classic-4.2.0/lib/watir-classic/element.rb:168:in 
> `click'
> #Also, does watir has ability the hover the cursor?
>

-- 
-- 
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]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to