The whole condition, with the OR, goes in the block. Like this:

Watir::Waiter.wait_until{ ie.p(:id,'savewarning').exists? ||
ie.p(:id,'saveconfirm').exists? }

Richard
--
Richard Lawrence
Certified Scrum Coach
Founder and Principal Consultant, Humanizing Work, LLC
303-895-7688
rich...@humanizingwork.com
www.humanizingwork.com
www.richardlawrence.info

On Thu, Feb 12, 2009 at 4:21 PM, niartseoj <niarts...@gmail.com> wrote:
>
> I'm trying to figure out how to use an OR statement between two
> wait_unti{....exist?}
>
> Steps/Scenario is as follows:
>
> 1. Page with Link
> 2. Click Link
> 3  Opens Confirmation
> 4. Click button in popup
> 5. Page does a postback in javascript.
>
> At this point I need to wait until the page is re-reendered with one
> of two P elements
>
> I'm trying to use from step 2:
>
> [i][6].button(:name, "deletedId").click_no_wait
> hwnd = ie.enabled_popup(15)
> #unmap the MS that has not records
>        if(hwnd)
>                popup = WinClicker.new
>                popup.makeWindowActive(hwnd) #Activate the window.
>                popup.clickWindowsButton_hwnd(hwnd,"OK") #Click the OK button
>        end
>
> Watir::Waiter.wait_until{ie.p(:id,'savewarning').exists? } ||
> Watir::Waiter.wait_until{ie.p(:id,'saveconfirm').exists? }
>
> Darn if I can't figure this out.. it appears the code is evaluating to
> the first part of OR condition each time..
> Looking through RUBY help now. Thanks for your input if you see
> something that my noob eyes don't see.
>
>
>
>
> >
>

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