I would like to say , this is such a perfect clarity! Yes this is the way 
wait has to work. 

On Thursday, September 13, 2018 at 8:57:57 PM UTC+5:30, Titus Fortner wrote:
>
> Ok, yes. This is a slight simplification, but think of Watir waiting for 
> what makes the most sense for the provided method.
>
> 1. Status Queries --> No automatic waits; immediate response or exception
> #exists? / #visible? / #present? / #enabled? 
>
> 2. Information Queries --> Automatically waits until exists in DOM
> #text / #value / #tag_name / #style / #attribute_value etc
>
> 3. Actions --> Automatically waits until displayed to user
> #click / #submit / #set / #clear / #select
>
>
>
> On Wednesday, September 12, 2018 at 10:46:27 PM UTC-7, NaviHan wrote:
>>
>> Hi Titus
>>
>> Thats makes it very clear now :-)
>>
>> Just to confirm, action methods as in set, click, select
>> And the reading attribute values like id, text, or any other custom 
>> attribute are not auto covered and we need to use wait_until(&:present?)
>>
>> Is that correct?
>>
>> Cheers
>> Navi
>>
>> On Tuesday, 11 September 2018 14:52:33 UTC+10, NaviHan wrote:
>>>
>>> This is something that keeps me a bit sceptic when I write and read the 
>>> automation code in my project.
>>> This used PageObjects.
>>>
>>> I have seen extensive use of element referces, for example 
>>>
>>> button(:add_to_bag, :css => '#add-to-cart')
>>> add_to_bag.element.when_present.click
>>>
>>>
>>>
>>> instead of 
>>>
>>> add_to_bag 
>>>
>>> which directly clicks the element
>>>
>>> I have also seen extensive use of referencing elements using 
>>> <element>.when_present, <element>.wait_until_present etc
>>>
>>> Im confused where we should draw the line when deciding to reference the 
>>> element and actually using it(as in directly calling "add_o_bag" in the 
>>> above example to click the element.
>>>
>>> Any thoughts?
>>>
>>>
>>>

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com
--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to