Class: Sapphire::WebAbstractions::TextBox
- Inherits:
-
Control
show all
- Defined in:
- lib/sapphire/WebAbstractions/Controls/TextBox.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, #Visible, #initialize
Instance Method Details
28
29
30
31
|
# File 'lib/sapphire/WebAbstractions/Controls/TextBox.rb', line 28
def Clear
textBox = self.Find
textBox.clear
end
|
#Set(value) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/sapphire/WebAbstractions/Controls/TextBox.rb', line 15
def Set(value)
if(value == "")
self.Clear
else
textBox = self.Find
readonly = textBox.attribute("readonly")
if readonly == "false" or readonly.nil?
textBox.clear
end
textBox.send_keys value
end
end
|
10
11
12
13
|
# File 'lib/sapphire/WebAbstractions/Controls/TextBox.rb', line 10
def Text
textBox = self.Find
textBox.attribute("value")
end
|
#Text=(value) ⇒ Object
5
6
7
8
|
# File 'lib/sapphire/WebAbstractions/Controls/TextBox.rb', line 5
def Text= (value)
textBox = self.Find
textBox.send_keys value
end
|