Sha256: 0510422f550eac61af8d7f1cd252e6cae1cbd1c28fcf608c41998d6687b82184

Contents?: true

Size: 659 Bytes

Versions: 1

Compression:

Stored size: 659 Bytes

Contents

module HtmlSelectorsHelpers
  # Maps a name to a selector. Used primarily by the
  #
  #   When /^(.+) within (.+)$/ do |step, scope|
  #
  # step definitions in web_steps.rb
  #
  def selector_for(locator)
    case locator

    when /the "([^"]+)" accordion section/
      [:xpath, Bermuda::XPath.accordion_content($1)]
    when /the "([^"]+)" dialog/
      [:xpath, Bermuda::XPath.dialog_content($1)]
    when /the "([^"]+)" tab/
      [:xpath, Bermuda::XPath.tab_content($1)]

    else
      raise "Can't find mapping from \"#{locator}\" to a selector.\n" +
        "Now, go and add a mapping in #{__FILE__}"
    end
  end
end

World(HtmlSelectorsHelpers)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bermuda-0.0.1 features/support/selectors.rb