class Watir::Radio
Public Instance Methods
build()
click to toggle source
Calls superclass method
Watir::Element#build
# File lib/watir/elements/radio.rb, line 3 def build @selector[:label] = @selector.delete(:text) if @selector.key?(:text) super end
set()
click to toggle source
Selects this radio button.
# File lib/watir/elements/radio.rb, line 12 def set click unless set? end
Also aliased as: select
set?()
click to toggle source
Is this radio set?
@return [Boolean]
# File lib/watir/elements/radio.rb, line 23 def set? element_call { @element.selected? } end
Also aliased as: selected?
text()
click to toggle source
Returns the text of the associated label. Returns empty string if no label is found.
@return [String]
# File lib/watir/elements/radio.rb, line 35 def text l = label l.exist? ? l.text : '' end