Description:
Base class containing items that are common between select list, text field, button, hidden, file field classes.
Description:
Initializes the instance of element.
Input:
- how - Attribute to identify the element. - what - Value of that attribute.
# File lib/firewatir/elements/input_element.rb, line 35 def initialize(container, how, what) @how = how @what = what @container = container @element_name = "" #super(nil) end
Description:
Locate the element on the page. Element can be a select list, text field, button, hidden, file field.
# File lib/firewatir/elements/input_element.rb, line 12 def locate case @how when :jssh_name @element_name = @what when :xpath @element_name = element_by_xpath(@container, @what) else if(self.class::INPUT_TYPES.include?("select-one")) @element_name = locate_tagged_element("select", @how, @what, self.class::INPUT_TYPES) else @element_name = locate_tagged_element("input", @how, @what, self.class::INPUT_TYPES) end end @o = self end