lib/element.rb in gridium-1.1.25 vs lib/element.rb in gridium-1.1.28
- old
+ new
@@ -8,11 +8,11 @@
def initialize(name, by, locator, opts = {})
@name = name
@by = by
@locator = locator
- @timeout = opts[:timeout] || Gridium.config.element_timeout
+ @timeout = opts[:timeout] || Gridium.config.element_timeout #don't set this to zero
@element_screenshot = nil #used to store the path of element screenshots for comparison
# wrapped driver
@driver = Driver.driver
@@ -102,11 +102,11 @@
rescue StandardError => error
Log.debug("[GRIDIUM::Element] element.present? is false because this error was rescued: #{error}")
return false
end
- def displayed?
- return element.displayed?
+ def displayed?(opts = {})
+ return element(opts).displayed?
rescue StandardError => error
Log.debug("[GRIDIUM::Element] element.displayed? is false because this error was rescued: #{error}")
return false
end