Sha256: 174f7026d2ca18e465bffbc80960334c8e19b3e15d5d2d39996a07aa2376487e
Contents?: true
Size: 912 Bytes
Versions: 12
Compression:
Stored size: 912 Bytes
Contents
# frozen_string_literal: true module Webdrone class Browser def wait @wait ||= Wait.new self end end class Wait attr_accessor :ignore attr_reader :a0 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 StandardError => error Webdrone.report_error(@a0, error) end def time(val) sleep val rescue StandardError => error Webdrone.report_error(@a0, error) end end end
Version data entries
12 entries across 12 versions & 1 rubygems