Module: SeleniumRecord::Axiable
- Defined in:
- lib/selenium_record/axiable.rb
Overview
Xpath axes helper methods for extending Selenium::WebDriver::Element
Instance Method Summary collapse
- #parent(tag_name = '*') ⇒ Object
-
#preceding_sibling(tag_name = '*') ⇒ Selenium::WebDriver::Element
The preceding-sibling axis element.
Instance Method Details
#parent(tag_name = '*') ⇒ Object
10 11 12 |
# File 'lib/selenium_record/axiable.rb', line 10 def parent(tag_name = '*') find_element xpath: "./parent::#{tag_name}" end |
#preceding_sibling(tag_name = '*') ⇒ Selenium::WebDriver::Element
Returns The preceding-sibling axis element.
6 7 8 |
# File 'lib/selenium_record/axiable.rb', line 6 def preceding_sibling(tag_name = '*') find_element xpath: "./preceding-sibling::#{tag_name}" end |