Is trying it this way not possible? I added the code to extend the ability 
to allow custom selectors:

module Watir
    class ElementLocator    
        alias :old_normalize_selector :normalize_selector
         
        def normalize_selector(how, what)
            case how
                when :data_sku
                    [how, what]
                else
                    old_normalize_selector(how, what)
            end
        end
    end
end


And here is my code trying to select it from the random array. Even with 
the middle two lines uncommented I still get errors.

$monthlydata = 
["GC311Z-02","GC307Z-02","GC308Z-02","GC309Z-02","GC310Z-02"].sample
#Watir::Wait.until { @b.radio(:data_sku, $monthlydata) }
#@b.radio(:xpath, "//input[@data_sku='$monthlydata']").exists?
@b.radio(:xpath, "//input[@data_sku='$monthlydata']").set (line causing the 
error)


The error I get is the UnknownObjectException: unable to locate element. 
The line that's throwing up the error is the last one shown.

-- 
-- 
Before posting, please read http://watir.com/support. 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/groups/opt_out.

Reply via email to