class LessForm::Element
Attributes
element[R]
Public Class Methods
new(wd_element)
click to toggle source
# File lib/less-form/element.rb, line 4 def initialize wd_element @element = wd_element end
Public Instance Methods
click()
click to toggle source
# File lib/less-form/element.rb, line 16 def click @element.click end
displayed?()
click to toggle source
# File lib/less-form/element.rb, line 24 def displayed? @element.displayed? end
flash()
click to toggle source
# File lib/less-form/element.rb, line 28 def flash @element.flash end
method_missing(m, *args, &blk)
click to toggle source
Calls superclass method
# File lib/less-form/element.rb, line 32 def method_missing m, *args, &blk if @element.respond_to?(m) @element.send m, *args, &blk else value = @element.attribute(m.to_s) (value.nil?)? super : value end #if end
set(what=nil)
click to toggle source
# File lib/less-form/element.rb, line 12 def set what=nil @element.send_keys(what) end
text()
click to toggle source
# File lib/less-form/element.rb, line 20 def text @element.text end
valid_element?(wd_element)
click to toggle source
# File lib/less-form/element.rb, line 8 def valid_element? wd_element raise InvalidWebDriverElementError unless wd_element.is_a?(Selenium::WebDriver::Element) end