Sha256: 99c8fe87db9d3f9adc73089d22ff2f23d0cabcfb81bd104ba93dd92e4a928e19
Contents?: true
Size: 854 Bytes
Versions: 23
Compression:
Stored size: 854 Bytes
Contents
module Webdrone class Browser def wait @wait ||= Wait.new self end end class Wait attr_accessor :a0, :ignore def initialize(a0) @a0 = a0 @ignore = [] @ignore << Selenium::WebDriver::Error::StaleElementReferenceError @ignore << Selenium::WebDriver::Error::NoSuchElementError @ignore << Selenium::WebDriver::Error::NoSuchFrameError @ignore << Selenium::WebDriver::Error::InvalidSelectorError end def for if @a0.conf.timeout Selenium::WebDriver::Wait.new(timeout: @a0.conf.timeout, ignore: @ignore).until do yield end else yield end rescue => exception Webdrone.report_error(@a0, exception) end def time(val) sleep val rescue => exception Webdrone.report_error(@a0, exception) end end end
Version data entries
23 entries across 23 versions & 1 rubygems