Module: SeleniumRecord::Html
- Included in:
- Base
- Defined in:
- lib/selenium_record/html.rb
Overview
Helpers for getting html related info to selenium objects
Instance Method Summary collapse
-
#tag_name ⇒ String
The tag name for the DOM element at the root of the object.
-
#to_html ⇒ String
The html content for the root element.
Instance Method Details
#tag_name ⇒ String
Returns the tag name for the DOM element at the root of the object. Used to define xpath locators.
13 14 15 |
# File 'lib/selenium_record/html.rb', line 13 def tag_name @tag_name ||= root_el.attribute('tagName') end |
#to_html ⇒ String
Returns the html content for the root element.
5 6 7 8 |
# File 'lib/selenium_record/html.rb', line 5 def to_html return root_el.attribute('innerHTML') if exist? nil end |