Sha256: 976728ca4afc3d62596a1ee0544cd70d5e199f8f88a4c8d05cac728e5df00ebe
Contents?: true
Size: 1.25 KB
Versions: 4
Compression:
Stored size: 1.25 KB
Contents
<%- if automation == 'sparkling_ios' -%> # frozen_string_literal: true require 'yaml' require 'sparkling_watir' module DriverHelper def app @app ||= create_app end private def create_app @app = SparklingWatir::App.new(caps: caps) end # :reek:UtilityFunction def caps YAML.load_file('config/capabilities.yml') end end <%- else -%> # frozen_string_literal: true <% if axe? -%> require 'axe-selenium' <% end -%> require 'yaml' <% if automation == 'selenium' -%> require 'active_support/inflector' require 'selenium-webdriver' <% else -%> require 'appium_lib' <% end -%> module DriverHelper <% if automation == 'selenium' && axe? == false -%> def driver(*opts) @driver ||= create_driver(*opts) end <% elsif axe? == true -%> 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! %> <%- if automation != 'selenium' -%> # :reek:UtilityFunction def caps YAML.load_file('config/capabilities.yml') end <%- end -%> end <%- end -%>
Version data entries
4 entries across 4 versions & 1 rubygems