Sha256: 61261a73cd4819cb29782e6df43952735c036d6580722b5e7951774a7a81ae7b

Contents?: true

Size: 491 Bytes

Versions: 5

Compression:

Stored size: 491 Bytes

Contents

module SeleniumRecord
  # Helpers for getting html related info to selenium objects
  module Html
    # @return [String] the html content for the root element
    def to_html
      return root_el.attribute('innerHTML') if exist?
      nil
    end

    # @return [String] the tag name for the DOM element at the root of the
    #   object. Used to define xpath locators.
    # @see preceding_sibling_locator
    def tag_name
      @tag_name ||= root_el.attribute('tagName')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
seleniumrecord-0.0.4 lib/selenium_record/html.rb
seleniumrecord-0.0.3 lib/selenium_record/html.rb
seleniumrecord-0.0.2.revision lib/selenium_record/html.rb
seleniumrecord-0.0.2 lib/selenium_record/html.rb
seleniumrecord-0.0.1.beta1 lib/selenium_record/html.rb