Class: Watizzle::Locators::Element::Locator
- Inherits:
-
Watir::Locators::Element::Locator
- Object
- Watir::Locators::Element::Locator
- Watizzle::Locators::Element::Locator
- Defined in:
- lib/watizzle/locators/element/locator.rb
Constant Summary collapse
- SIZZLE_LOADER_PATH =
File.('../../../sizzle/loader.js.erb', __FILE__)
Instance Method Summary collapse
Instance Method Details
#locate ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/watizzle/locators/element/locator.rb', line 9 def locate e = by_id and return e # short-circuit if :id is given element = find_first_by_multiple element_validator.validate(element, @selector) if element rescue Selenium::WebDriver::Error::NoSuchElementError, Selenium::WebDriver::Error::StaleElementReferenceError nil end |
#locate_all ⇒ Object
17 18 19 |
# File 'lib/watizzle/locators/element/locator.rb', line 17 def locate_all find_all_by_multiple end |