Sha256: cc453df7569523df6254e63df8a2403b216a014991a76efaa7533f853d0de31e

Contents?: true

Size: 1.26 KB

Versions: 5

Compression:

Stored size: 1.26 KB

Contents

require 'vapir-common'

# create stub class since everything is defined in Vapir::IE namespace - this needs to be defined before the real class.
require 'vapir-common/browser'
module Vapir
  IE= Class.new(Vapir::Browser)
end

# these switches need to be deleted from ARGV to enable the Test::Unit
# functionality that grabs
# the remaining ARGV as a filter on what tests to run.
# Note: this means that watir must be require'd BEFORE test/unit.
# (Alternatively, you could require test/unit first and then put the Vapir::IE
# arguments after the '--'.)

# Make Internet Explorer invisible. -b stands for background
$HIDE_IE ||= ARGV.delete('-b')

# Run fast
$FAST_SPEED = ARGV.delete('-f')

# Eat the -s command line switch (deprecated)
ARGV.delete('-s')

require 'vapir-ie/ie-class'
require 'vapir-ie/elements'
require 'vapir-ie/version'

require 'vapir-common/waiter'

module Vapir
  include Vapir::Exception

  # Directory containing the watir.rb file
  @@dir = File.expand_path(File.dirname(__FILE__))

  ATTACHER = Waiter.new
  # Like regular Ruby "until", except that a TimeOutException is raised
  # if the timeout is exceeded. Timeout is IE.attach_timeout.
  def self.until_with_timeout # block
    ATTACHER.timeout = IE.attach_timeout
    ATTACHER.wait_until { yield }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vapir-ie-1.7.2 lib/vapir-ie.rb
vapir-ie-1.7.1 lib/vapir-ie.rb
vapir-ie-1.7.1.rc1 lib/vapir-ie.rb
vapir-ie-1.7.0 lib/vapir-ie.rb
vapir-ie-1.7.0.rc1 lib/vapir-ie.rb