Oh interesting, if you are using a regular expression instead of a String it doesn't throw the deprecation warning... :-/
The idea is that instead of treating classes like a string to be matched, to treat them like what they are, an array of distinct objects where order doesn't matter. On Wed, Jul 25, 2018 at 9:32 AM NaviHan <[email protected]> wrote: > > You are right Titus. I had a talk to the devs and found that the radio > buttons are hidden lol. > So I just defined the labels as > labels(:in_store_sizes, :for => /instore_size/) > > And then did the click and this worked, sigh.. > > But I havent progressed further, but I would like to ask one question > there is a label tag under each list element. Are they indexed so that I can > access by index=0 etc? > > Also wrt your previous reply I would like to ask you what was wrong with > "unordered_list(:sizes_instore, :class => /swatches instore/)" because you > have suggested to modify it as `class: ['swatches', 'instore']` > > Thanks a lot for taking time to assist :-) > On Wednesday, 25 July 2018 13:51:06 UTC+10, NaviHan wrote: >> >> Banging my head over this. >> I have a section of page with a paren unordered list , list item and child >> radio buttons >> >> <ul class="swatches instore size open row" data-tooltip="" >> aria-haspopup="true" data-disable-hover="true" tabindex="1" title="Please >> select a size"> >> >> <li class="selectable shrink >> columns"> >> <input type="radio" >> name="dwfrm_stockinstoreavailability_sizeField" id="instore_size_XXS/XS" >> value="XXS/XS" class="size-value"> >> <label >> for="instore_size_XXS/XS" title="Select Size: XXS/XS" >> data-attribute-type="size" data-size="XXS/XS" class="value-cont"> >> <span >> class="swatchanchor-value">XXS/XS</span> >> </label> >> </li> >> >> <li class="selectable shrink >> columns"> >> <input type="radio" >> name="dwfrm_stockinstoreavailability_sizeField" id="instore_size_XS/S" >> value="XS/S" class="size-value"> >> <label >> for="instore_size_XS/S" title="Select Size: XS/S" data-attribute-type="size" >> data-size="XS/S" class="value-cont"> >> <span >> class="swatchanchor-value">XS/S</span> >> </label> >> </li> >> >> >> >> </ul> >> >> I have defined the unordered list as >> >> unordered_list(:sizes_instore, :class => /swatches instore/) >> >> Im trying to click the radio button under that using the following, none of >> them worked >> >> sizes_instore_element.list_items[size_position.to_i].radio_button_element.select >> sizes_instore_element.list_items[size_position.to_i].radio_button_element.click >> sizes_instore_element.list_items[size_position.to_i].select_radio_button_element >> >> sizes_instore_element.list_items[size_position.to_i].radio.click >> >> >> >> Any clue? > > -- > -- > 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.
