Module: QAT::Web::Elements
- Defined in:
- lib/qat/web/elements.rb,
lib/qat/web/elements/base.rb,
lib/qat/web/elements/config.rb,
lib/qat/web/elements/element.rb,
lib/qat/web/elements/waiters.rb,
lib/qat/web/elements/selector.rb,
lib/qat/web/elements/collection.rb
Overview
Helper methods to define elements and load configurations. Auxiliary methods for the elements are also defined here.
Defined Under Namespace
Modules: Config, Selector, Waiters Classes: Base, Collection, Element
Instance Method Summary collapse
-
#load_elements_file(file_path) ⇒ Hash
Loads a configuration file.
Methods included from Waiters
#timeouts, #timeouts_config, #timeouts_file, #wait_until, #wait_until_not_present, #wait_until_not_visible, #wait_until_present, #wait_until_visible
Methods included from Config
Methods included from Selector
Methods included from Configuration
last_access, #last_access, last_access=, #parse_configuration
Instance Method Details
#load_elements_file(file_path) ⇒ Hash
Loads a configuration file
18 19 20 21 22 23 24 25 26 |
# File 'lib/qat/web/elements.rb', line 18 def load_elements_file(file_path) begin config = YAML::load(ERB.new(File.read(file_path)).result) rescue Psych::SyntaxError log.error "Failed to load file '#{file_path}'." raise end config end |