Glad I could help, but now I'm going to go refactor everything so it will be less confusing going forward. :)
On Thu, Sep 13, 2018 at 6:33 PM NaviHan <[email protected]> wrote: > > Got you, Titus > The fundamental aspects are clear now. > > I will get back if I find a real case in my project that is not working as > per my understanding > > Thanks a million for taking time to clarify things. really appreciate it :-) > > 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. > > [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. -- -- 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.
