Class: Sapphire::WebAbstractions::TextArea

Inherits:
Control show all
Defined in:
lib/sapphire/WebAbstractions/Controls/TextArea.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

Constructor Details

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

Instance Method Details

#ClearObject



23
24
25
26
# File 'lib/sapphire/WebAbstractions/Controls/TextArea.rb', line 23

def Clear
  textarea = self.Find
  textarea.clear
end

#Set(value) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/sapphire/WebAbstractions/Controls/TextArea.rb', line 10

def Set(value)
  if(value == "")
    self.Clear
  else
    textarea = self.Find
    readonly = textarea.attribute("readonly")
    if readonly == "false"
      textarea.clear
    end
    textarea.send_keys value
  end
end

#TextObject



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

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