Class: Sapphire::WebAbstractions::CheckBox
- Defined in:
- lib/sapphire/WebAbstractions/Controls/CheckBox.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, #Text, #Visible, #initialize
Constructor Details
This class inherits a constructor from Sapphire::WebAbstractions::Control
Instance Method Details
#Check(value) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/sapphire/WebAbstractions/Controls/CheckBox.rb', line 4 def Check (value) checked = self.Checked().Evaluate() if value && checked return end if !value && !checked return end self.Click end |
#Checked ⇒ Object
18 19 20 21 |
# File 'lib/sapphire/WebAbstractions/Controls/CheckBox.rb', line 18 def Checked radio = self.Find ControlEvaluation.new(radio.attribute("checked") != nil, true, self) end |
#Clear ⇒ Object
23 24 25 |
# File 'lib/sapphire/WebAbstractions/Controls/CheckBox.rb', line 23 def Clear self.Check false end |