module SeleniumRecord::Html

Helpers for getting html related info to selenium objects

Public Instance Methods

tag_name() click to toggle source

@return [String] the tag name for the DOM element at the root of the

object. Used to define xpath locators.

@see preceding_sibling_locator

# File lib/selenium_record/html.rb, line 13
def tag_name
  @tag_name ||= root_el.attribute('tagName')
end
to_html() click to toggle source

@return [String] the html content for the root element

# File lib/selenium_record/html.rb, line 5
def to_html
  return root_el.attribute('innerHTML') if exist?
  nil
end