Module: Watir

Defined in:
lib/watir/wait_helper.rb,
lib/watir/util.rb,
lib/watir/wait.rb,
lib/watir/waiter.rb,
lib/watir/browser.rb,
lib/watir/options.rb,
lib/watir/version.rb,
lib/watir/testcase.rb,
lib/watir/assertions.rb,
lib/watir/exceptions.rb,
lib/watir/element_extensions.rb

Overview

include this module if there’s a need to have wait_until and wait_while methods in some different scope

Defined Under Namespace

Modules: Assertions, Browser, ElementExtensions, Exception, Wait, WaitHelper Classes: Options, TestCase, TimeKeeper, Util, Waiter

Constant Summary collapse

VERSION =
File.exists?(version_file) ? File.read(version_file).strip : "0.0.0"
@@options_file =
nil
@@options =
nil

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.optionsObject

Return the Watir options, as a hash. If they haven’t been parsed yet, they will be now.



24
25
26
# File 'lib/watir/options.rb', line 24

def options
  @@options ||= Watir::Options.new.execute
end

.options=(x) ⇒ Object



19
20
21
# File 'lib/watir/options.rb', line 19

def options= x
  @@options = x
end

.options_fileObject



16
17
18
# File 'lib/watir/options.rb', line 16

def options_file
  @@options_file
end

.options_file=(file) ⇒ Object

Specify the location of a yaml file containing Watir options. Must be specified before the options are parsed.



13
14
15
# File 'lib/watir/options.rb', line 13

def options_file= file
  @@options_file = file
end

Instance Method Details

#wait_until(*args) ⇒ Object



10
11
12
# File 'lib/watir/waiter.rb', line 10

def wait_until(*args)
  Waiter.wait_until(*args) {yield}
end