Module: Vapir
- Defined in:
- lib/vapir-common.rb,
lib/vapir-common/waiter.rb,
lib/vapir-common/browser.rb,
lib/vapir-common/element.rb,
lib/vapir-common/options.rb,
lib/vapir-common/testcase.rb,
lib/vapir-common/container.rb,
lib/vapir-common/specifier.rb,
lib/vapir-common/exceptions.rb,
lib/vapir-common/modal_dialog.rb,
lib/vapir-common/page_container.rb,
lib/vapir-common/elements/elements.rb,
lib/vapir-common/element_collection.rb
Defined Under Namespace
Modules: Area, Assertions, Button, CheckBox, Common, Container, Dd, Div, Dl, Dt, Element, ElementClassAndModuleMethods, ElementHelper, ElementObjectCandidates, Em, Exception, FileField, Form, Frame, H1, H2, H3, H4, H5, H6, HasRowsAndColumns, Hidden, Image, InputElement, Label, Li, Link, Map, ModalDialog, Ol, Option, P, PageContainer, Pre, Radio, RadioCheckBoxCommon, SelectList, Span, Strong, TBody, Table, TableCell, TableRow, TextField, Ul
Classes: Browser, ElementCollection, Options, TestCase, TimeKeeper, Waiter
Constant Summary
collapse
- @@options_file =
nil
- @@options =
nil
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.fuzzy_match(attr, what) ⇒ Object
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
|
# File 'lib/vapir-common/specifier.rb', line 304
def fuzzy_match(attr, what)
case what
when String, Symbol
case attr
when String, Symbol
attr.to_s.downcase.strip==what.to_s.downcase.strip
else
attr==what
end
when Regexp
case attr
when Regexp
attr==what
else
attr =~ what
end
when Numeric
attr==what || attr==what.to_s
else
attr==what
end
end
|
.options ⇒ Object
Return the Vapir options, as a hash. If they haven’t been parsed yet, they will be now.
20
21
22
|
# File 'lib/vapir-common/options.rb', line 20
def options
@@options ||= Vapir::Options.new.execute
end
|
.options=(x) ⇒ Object
15
16
17
|
# File 'lib/vapir-common/options.rb', line 15
def options= x
@@options = x
end
|
.options_file ⇒ Object
12
13
14
|
# File 'lib/vapir-common/options.rb', line 12
def options_file
@@options_file
end
|
.options_file=(file) ⇒ Object
Specify the location of a yaml file containing Vapir options. Must be specified before the options are parsed.
9
10
11
|
# File 'lib/vapir-common/options.rb', line 9
def options_file= file
@@options_file = file
end
|
Instance Method Details
#wait_until(*args) ⇒ Object
5
6
7
|
# File 'lib/vapir-common/waiter.rb', line 5
def wait_until(*args)
Waiter.wait_until(*args) {yield}
end
|