Class: Sapphire::WebAbstractions::RadioButton

Inherits:
Control show all
Defined in:
lib/sapphire/WebAbstractions/Controls/RadioButton.rb

Instance Attribute Summary

Attributes inherited from Control

#control, #found_by_type, #found_by_value

Instance Method Summary collapse

Methods inherited from Control

#Click, #Contain, #Equals, #Evaluate, #Find, #FindAll, #FindWithoutWait, #GetValue, #In, #MouseOver, #Substitute, #initialize

Constructor Details

This class inherits a constructor from Sapphire::WebAbstractions::Control

Instance Method Details

#Check(value) ⇒ Object



9
10
11
12
# File 'lib/sapphire/WebAbstractions/Controls/RadioButton.rb', line 9

def Check (value)
  radio = self.Find
  radio.click
end

#SelectedObject



14
15
16
17
18
# File 'lib/sapphire/WebAbstractions/Controls/RadioButton.rb', line 14

def Selected
  radio = self.Find
  val = radio.attribute("selected")
  return ControlEvaluation.new(val != nil, true, self)
end

#TextObject



5
6
7
# File 'lib/sapphire/WebAbstractions/Controls/RadioButton.rb', line 5

def Text
  self.Find().text
end

#Visible(shouldWait = true, comparator = nil) ⇒ Object



20
21
22
23
24
# File 'lib/sapphire/WebAbstractions/Controls/RadioButton.rb', line 20

def Visible(shouldWait = true, comparator = nil)
  radio = self.Find comparator
  x = radio.attribute("disabled")
  ControlEvaluation.new((x == "false" || x.nil?), true, self)
end