lib/watir-webdriver/locators/element_locator.rb in watir-webdriver-0.5.1 vs lib/watir-webdriver/locators/element_locator.rb in watir-webdriver-0.5.2

- old
+ new

@@ -1,10 +1,9 @@ # encoding: utf-8 module Watir class ElementLocator include Watir::Exception - include Selenium WD_FINDERS = [ :class, :class_name, :css, @@ -34,11 +33,11 @@ end # this actually only applies when finding by xpath - browser.text_field(:xpath, "//input[@type='radio']") # we don't need to validate the element if we built the xpath ourselves. validate_element(element) if element - rescue WebDriver::Error::NoSuchElementError => wde + rescue Selenium::WebDriver::Error::NoSuchElementError => wde nil end def locate_all if @selector.size == 1 @@ -243,10 +242,10 @@ element = @wd.find_element(:id, id) return if tag_name && !tag_name_matches?(element.tag_name.downcase, tag_name) element - rescue WebDriver::Error::NoSuchElementError => wde + rescue Selenium::WebDriver::Error::NoSuchElementError => wde nil end def all_elements @wd.find_elements(:xpath => ".//*")