Hi Navi,

Just to be clear, are you saying that "Watir::Wait.until(timeout: 30) {
@browser.execute_script('return jQuery.active == 0')}" solves the timing 
issue? You are just asking if there is a Page Object way to avoid doing 
this manually everywhere?

Thanks,
Justin


On Tuesday, August 7, 2018 at 8:27:15 AM UTC-4, NaviHan wrote:
>
> Hi Titus
>
> I found a good deal of documentation from PageObject wiki so was able to 
> substitue the waits with PageObject equivalent.
> https://github.com/cheezy/page-object/wiki/Ajax-Calls
>
> Still the issue with spinner(Loader.bg) holds and Im working this around 
> using "Watir::Wait.until(timeout: 30) {@browser.execute_script('return 
> jQuery.active == 0')}"
>
> Is there any solution in PageObject gem to handle this is still an open 
> question. Do you reckon I could get some help somewhere?
>
> I would require your help to clear my doubts about "wait while" and "wait 
> until". I see this is something extensively used in out project but no one 
> has a clear answer.A grep gave me this
>
> ./features/support/pages/Frontend/COG/Checkout_Page.rb:    Watir::Wait.
> while {order_summ_content_element.visible?}
> ./features/support/pages/Frontend/COG/Paypal_Page.rb:    Watir::Wait.while 
> {paypal_logo_element.visible?}
> ./features/support/pages/Frontend/COG/Paypal_Page.rb:    Watir::Wait.while 
> {paypal_spinner_element.visible?}
> ./features/support/pages/Frontend/COG/Pdp_Page.rb:    if Watir::Wait.while 
> {olapped_sm_window_element.visible?}
> ./features/support/pages/Frontend/COG/Pdp_Page.rb:    # Watir::Wait.while 
> {stores_elements[9].visible?}
> ./features/support/pages/Frontend/COG/Pdp_Page.rb:    Watir::Wait.while {
> stores_elements[9].visible?}
> ./features/support/pages/Frontend/COG/Thankyou_Page.rb:    return Watir::
> Wait.while {@browser.text.include?('Did you enjoy your shopping 
> experience today')}
>
>
> And Wait.until is used everywhere and the list is huge
>     ./features/support/pages/Frontend/COG/Pdp_Page.rb:    # 
> Watir::Wait.until {check_stores_element}.click
>     ./features/support/pages/Frontend/COG/Pdp_Page.rb:      #return 
> Watir::Wait.until {el}.parent(:index => 1).attribute('class') if 
> el.text.include? "#{size}"
>     ./features/support/pages/Frontend/COG/Pdp_Page.rb:      #return 
> Watir::Wait.until {el}.parent.attribute('class') if 
> el.span_element.text.include? "#{size}"
>     ./features/support/pages/Frontend/COG/Pdp_Page.rb:    #return 
> Watir::Wait.until {search_string_element}.attribute('value')
>     ./features/support/pages/Frontend/COG/Pdp_Page.rb:    #return 
> Watir::Wait.until {search_string_element}.attribute('value')
>     ./features/support/pages/Frontend/COG/Pdp_Page.rb:    @succ_txt = 
> Watir::Wait.until {pdp_success_msg_block_element}.text
>     ./features/support/pages/Frontend/COG/Pdp_Page.rb:    Watir::Wait.
> until(timeout: 30){add_to_bag_element.enabled?}
>     ./features/support/pages/Frontend/COG/Search_Page.rb:    Watir::Wait.
> until {search_field_element}.when_present.clear
>     ./features/support/pages/Frontend/COG/Search_Page.rb:    Watir::Wait.
> until {search_field_element}.when_present.click
>     ./features/support/pages/Frontend/COG/Search_Page.rb:    Watir::Wait.
> until {search_field_element}.when_present.set(arg)
>
> I dont get any idea out of this..
>
>
>
>

-- 
-- 
Before posting, please read 
https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
 
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