Module: QAT::Web::Elements::Selector

Extended by:
Selector
Includes:
Configuration
Included in:
QAT::Web::Elements, Base, Selector, Waiters
Defined in:
lib/qat/web/elements/selector.rb

Overview

Helper methods for handling selectors and selector transformations

Since:

  • 1.0.0

Defined Under Namespace

Classes: InvalidConfigurationError

Instance Method Summary collapse

Methods included from Configuration

last_access, #last_access, last_access=, #parse_configuration

Instance Method Details

#selector(config, *args) ⇒ Array

Returns the selector from configuration

Examples:

xpath with ".//div[@class='ng-pristine' and text()='$0']//span[contains(text(), '$1')]"
args with: ["Some Text", "More Text" ]
The final output will be ".//div[@class='ng-pristine' and text()='Some Text']//span[contains(text(), 'More Text')]"

Parameters:

  • config (Hash)

    element selector configuration

  • args (Array)

    (Optional) Substitutions to the XPATH string base in $ syntax

Returns:

  • (Array)

    selector

Since:

  • 1.0.0



30
31
32
# File 'lib/qat/web/elements/selector.rb', line 30

def selector(config, *args)
  extract_selector(config, *args)
end