[wtr-general] Re: What is the default element and page wait in Watir. Do we have to explicitly set PageObject.default_element_wait?

2019-04-17 Thread jkotests
The PageObject::Elements::Div#wait_until just calls the underlying Watir::Div#wait_until method, but with different default values (ie the timeout). For the returned object: * Watir::Div#wait_until is set to return itself - ie the Watir::Div. * PageObject::Elements::Div#wait_until simply return

[wtr-general] Re: What is the default element and page wait in Watir. Do we have to explicitly set PageObject.default_element_wait?

2019-04-16 Thread NaviHan
In fact I have printed three classes puts applied_voucher_list_element.class puts applied_voucher_list_element.element.class puts applied_voucher_list_element.wait_until(&:present?).class and got PageObject::Elements::Div Watir::Div Watir::Div How is applied_voucher_list_element.wait_until(&

[wtr-general] Re: What is the default element and page wait in Watir. Do we have to explicitly set PageObject.default_element_wait?

2019-04-16 Thread NaviHan
Hi Justin Also please note the error I was getting as I mention in the original post [31m timed out after 10 seconds, waiting for true condition on #"slide-dialog-container-cart-page", :tag_name=>"div"}> (Watir::Wait::TimeoutError) [0m Watir::Div timed out after 10 seconds. The 10 seco

[wtr-general] Re: What is the default element and page wait in Watir. Do we have to explicitly set PageObject.default_element_wait?

2019-04-16 Thread NaviHan
Hi Justin It a bit confusing... For example I have defined a PageObject element as div(:applied_voucher_list, :class => 'applied-evouchers') When I print the class of it puts applied_voucher_list_element.wait_until(&:present?).class Im getting Watir::Div I would expect this to return Pag

[wtr-general] Re: What is the default element and page wait in Watir. Do we have to explicitly set PageObject.default_element_wait?

2019-04-16 Thread Justin Ko
Hi Navi, 1) It would depend on who is calling the method - ie a Watir::Element vs a PageObject::Element. Generally you would be working with PageObject::Element, so you would be calling the Page-Object version. The recent versions of Page-Object forward missing methods directly to the Watir br

[wtr-general] Re: What is the default element and page wait in Watir. Do we have to explicitly set PageObject.default_element_wait?

2019-04-15 Thread NaviHan
Hi Justin I have two questions here.. 1. Im use *wait_until(&:present) *a lot. I see *wait_until* is a method which is present in Watir and PageObject and as you said *wait_until of PageObject *depends on *default_element_wait* Do you know which method is invoked when I call a *wait_until(&:

[wtr-general] Re: What is the default element and page wait in Watir. Do we have to explicitly set PageObject.default_element_wait?

2019-04-15 Thread Justin Ko
Page-Object introduces its own couple of waits (https://github.com/cheezy/page-object/blob/master/lib/page-object.rb#L87-L113): - default_page_wait which has a default of 30 and - default_element_wait which has a default of 5 The default_element_wait will impact the Element methods #check_