My guess is that this is Ajax code and that a robust fix would be to add 
some calls to "wait_until".

I also suspect that your new environment is using a faster browser 
and/or version of watir and that this is why you are now seeing timing 
problems.

Bret

P.S. The other solution might be to litter your code with sleeps. Just 
kidding!

Shlomit Gazit wrote:
> One specific example I have:
> I ran a test that is passing on my old environment and on the new
> environment it is intermittent.
>
> When trying to find popup:
>
> The code is:
>
>           $ie.cell(:class, "c2p-action-down-arrow-horizontal").click
>           $ie.link(:id, "ID_EDITWATCHERS_MENU").click
>           $ie1 = Watir::IE.attach(:title, /C2P/)
>           $ie1.wait
>           $ie1.select_list(:id,
> "RIGHT_HAND_LIST").select_item_in_select_list(:index, 0)
>           $ie1.image(:src, /button_triangle_left/).click .
>
>
> I got the error:
>
>  1) Error:
> test_issue_top(TC_c2p_all_issues):
> Watir::Exception::UnknownObjectException: Unable to locate element,
> using :id, "RIGHT_HAND_LIST"
>     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
> 52:in `assert_exists'
>     C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> input_elements.rb:63:in `select_item_in_select_list'
>     C:/Program Files/Genuitec/MyEclipse 7.5/Workspaces/MyEclipse/
> c2p_watir/c2p_test_issues_2_menus_dev.rb:67:in `setup'
>
> 1 tests, 0 assertions, 0 failures, 1 errors
>
>
> On Oct 14, 12:16 am, Željko Filipin <zeljko.fili...@wa-research.ch>
> wrote:
>   
>> 2009/10/14 Shlomit Gazit <shlomitpatr...@gmail.com>
>>
>>     
>>> I dont know if a downgrade will solve the problem.
>>>       
>> I do not know too. Try and let us know.
>>
>>     
>>> For instance I can click in a frame with the old machine and watir
>>> doesnt find it on the new machine.
>>>       
>> And the error message is?
>>
>> Željko
>>     
> >
>   


-- 
Bret Pettichord
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to