Sha256: 7a4fcf79db275edaed8acd1752716f66a8bbb5fa4b341832fdd765ccdc776ac4

Contents?: true

Size: 764 Bytes

Versions: 18

Compression:

Stored size: 764 Bytes

Contents

# frozen_string_literal: true
<% if axe? -%>
require 'axe-selenium'
<% end -%>
require 'yaml'
<%- unless axe? %>
<%- if selenium_based? -%>
require 'active_support/inflector'
require 'selenium-webdriver'
<%- else -%>
require 'appium_lib'
<%- end -%>
<%- end -%>

module DriverHelper
  <%- if selenium_based? && !axe? -%>
  def driver(*opts)
    @driver ||= create_driver(*opts)
  end
  <%- elsif axe? -%>
  def driver(browser = :chrome, js_path = nil, skip_iframes = nil)
    @driver ||= create_driver(browser, js_path, skip_iframes)
  end
  <%- else -%>
  def driver
    @driver ||= create_driver
  end
  <%- end -%>

  private

  <%= ERB.new(File.read(File.expand_path('./partials/driver_and_options.tt', __dir__)), trim_mode: '-').result(binding).strip! %>
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby_raider-1.1.1 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.1.0 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.9 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.8 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.7 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.6 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.5 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.4 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.3 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.2 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.1 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-1.0.0 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-0.9.9 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-0.9.8 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-0.9.7 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-0.9.6 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-0.9.5 lib/generators/templates/helpers/driver_helper.tt
ruby_raider-0.9.4 lib/generators/templates/helpers/driver_helper.tt