Debugging a bit, I did 

puts "Print #{instore_size_selector_elements[2]}"  which gave me 

<PageObject::Elements::RadioButton:0x0000000003f9a418>

Im not able to click radio button trying all possible means.

"instore_size_selector_elements[2].set" gives
"instore_size_selector_elements[2].select"
"instore_size_selector_elements[2].click"

All gives
Watir::Exception::UnknownObjectException: element located, but timed out after 
30 seconds, waiting for #<Watir::Radio: located: true; 
{:name=>"dwfrm_stockinstoreavailability_sizeField", :tag_name=>"input", 
:type=>"radio", :index=>2}> to be present


What a pain :-(





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.

Reply via email to