Class: Sapphire::WebAbstractions::TextBox

Inherits:
Control
  • Object
show all
Defined in:
lib/sapphire/WebAbstractions/Controls/TextBox.rb

Instance Method Summary collapse

Methods inherited from Control

#Click, #Equals, #Find, #FindAll, #FindAllBy, #FindBy, #FindParent, #FindWithoutWait, #FindWithoutWaitBy, #MouseOver, #initialize

Constructor Details

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

Instance Method Details

#ClearObject



24
25
26
27
# File 'lib/sapphire/WebAbstractions/Controls/TextBox.rb', line 24

def Clear
  text = self.Find
  text.clear
end

#Set(value) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/sapphire/WebAbstractions/Controls/TextBox.rb', line 15

def Set(value)
  if(value == "")
    self.Clear
  else
    text = self.Find
    text.send_keys value
  end
end

#TextObject



10
11
12
13
# File 'lib/sapphire/WebAbstractions/Controls/TextBox.rb', line 10

def Text
  text = self.Find
  text.attribute("value")
end

#Text=(value) ⇒ Object



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

def Text= (value)
  text = self.Find
  text.send_keys value
end