lib/appium_lib/common/helper.rb in appium_lib-0.7.1 vs lib/appium_lib/common/helper.rb in appium_lib-0.8.0
- old
+ new
@@ -61,17 +61,10 @@
end
end
result
end
- # Find by id. Useful for selendroid
- # @param id [String] the id to search for
- # @return [Element]
- def id id
- find_element :id, id
- end
-
# Navigate back.
# @return [void]
def back
@driver.navigate.back
end
@@ -258,6 +251,12 @@
# @return [String]
def resolve_id id
lazy_load_strings
@strings_xml[id]
end
+
+ # Used to error when finding a single element fails.
+ def raise_no_element_error
+ raise Selenium::WebDriver::Error::NoSuchElementError, 'An element could not be located on the page using the given search parameters.'
+ end
+
end # module Appium::Common
\ No newline at end of file