[wtr-general] Re: Issue with watir index or Am I doing something wrong

2018-11-23 Thread NaviHan
Hi Justin The collection was the first thing I tried. But the issue is when there is only one gift card applied, meaning only one div with class > Having trouble using index. > > I have a section of a page as below. > > > Card > Amount Taken > > ="display: flex;">

[wtr-general] Re: Issue with watir index or Am I doing something wrong

2018-11-23 Thread Justin Ko
Instead of working from the the "gc-list", you could work from the "gift-cards-list". It would save a level of nesting and eliminate the child vs descendant difference: # Page-Object divs(:applied_gift_card, :class => 'gift-cards-list') # Usage p page.applied_gift_card_elements[0].div_element(i