class AutomationObject::Driver::Element

Element adapter interface

Public Instance Methods

attribute(key, value = nil) click to toggle source

Set or Get attribute @param key [String] key of element @param value [String, nil] set value or leave blank @return [String, nil]

# File lib/automation_object/driver/element.rb, line 13
def attribute(key, value = nil)
  adapter.attribute(key, value)
end
box_coordinates() click to toggle source

@return [BoxCoordinates] :x1, :x2, :y1, :y2 coordinates of a box

# File lib/automation_object/driver/element.rb, line 116
def box_coordinates
  adapter.box_coordinates
end
clear() click to toggle source

Clear the element field @return [void]

# File lib/automation_object/driver/element.rb, line 41
def clear
  adapter.clear
end
click() click to toggle source

Perform a click action on the element @return [void]

# File lib/automation_object/driver/element.rb, line 81
def click
  adapter.click
end
collides_with_element?(second_element_object, collision_tolerance = false) click to toggle source

@param second_element_object [Object] element to compare to @param collision_tolerance [Numeric, FalseClass] pixel tolerance of collisions @return [Boolean] element collides with other

# File lib/automation_object/driver/element.rb, line 123
def collides_with_element?(second_element_object, collision_tolerance = false)
  adapter.collides_with_element?(second_element_object, collision_tolerance)
end
content() click to toggle source

@return [String, nil] content attribute

# File lib/automation_object/driver/element.rb, line 106
def content
  adapter.content
end
element_center() click to toggle source

@return [Point] :x, :y coordinates

# File lib/automation_object/driver/element.rb, line 111
def element_center
  adapter.element_center
end
height() click to toggle source

@return [Numeric] height of element

# File lib/automation_object/driver/element.rb, line 101
def height
  adapter.height
end
hover() click to toggle source

Hover over element @return [void]

# File lib/automation_object/driver/element.rb, line 129
def hover
  adapter.hover
end
href() click to toggle source

@return [String] href of element

# File lib/automation_object/driver/element.rb, line 23
def href
  adapter.href
end
id() click to toggle source

@return [String] id of element

# File lib/automation_object/driver/element.rb, line 18
def id
  adapter.id
end
invisible?() click to toggle source

@return [Boolean]

# File lib/automation_object/driver/element.rb, line 51
def invisible?
  adapter.invisible?
end
location() click to toggle source

Get the location @return [Point]

# File lib/automation_object/driver/element.rb, line 57
def location
  adapter.location
end
scroll_into_view() click to toggle source

Scroll the element into view @return [void]

# File lib/automation_object/driver/element.rb, line 75
def scroll_into_view
  adapter.scroll_into_view
end
send_keys(string) click to toggle source

Type into an element @return [void]

# File lib/automation_object/driver/element.rb, line 35
def send_keys(string)
  adapter.send_keys(string)
end
size() click to toggle source

Get the size of an element @return [Dimension]

# File lib/automation_object/driver/element.rb, line 63
def size
  adapter.size
end
submit() click to toggle source

Perform a submit action on an element @return [void]

# File lib/automation_object/driver/element.rb, line 69
def submit
  adapter.submit
end
switch_to_iframe() click to toggle source

Helper method to switch to this element's iframe @return [void]

# File lib/automation_object/driver/element.rb, line 135
def switch_to_iframe
  adapter.switch_to_iframe
end
text() click to toggle source

Text of element @return [String, nil]

# File lib/automation_object/driver/element.rb, line 29
def text
  adapter.text
end
visible?() click to toggle source

@return [Boolean]

# File lib/automation_object/driver/element.rb, line 46
def visible?
  adapter.visible?
end
width() click to toggle source

@return [Numeric] width of element

# File lib/automation_object/driver/element.rb, line 96
def width
  adapter.width
end
x() click to toggle source

@return [Numeric] x position of element

# File lib/automation_object/driver/element.rb, line 86
def x
  adapter.x
end
y() click to toggle source

@return [Numeric] y position of element

# File lib/automation_object/driver/element.rb, line 91
def y
  adapter.y
end