Sha256: 8992f8f80e43a9518e1e66808a8fa56166945fa582cee1b6b0d1f40aaf2440eb

Contents?: true

Size: 1.71 KB

Versions: 20

Compression:

Stored size: 1.71 KB

Contents

require 'ops_manager_ui_drivers/wait_helper'

module OpsManagerUiDrivers
  module PageHelpers
    include OpsManagerUiDrivers::WaitHelper

    def om_1_4(ops_manager_url, browser = self)
      @om_1_4 ||= create_web_ui(
        ops_manager_url: ops_manager_url,
        browser: browser,
        version_module: Version14,
      )
    end

    def om_1_5(ops_manager_url, browser = self)
      @om_1_5 ||= create_web_ui(
        ops_manager_url: ops_manager_url,
        browser: browser,
        version_module: Version15,
      )
    end

    def om_1_6(ops_manager_url, browser = self)
      @om_1_6 ||= create_web_ui(
        ops_manager_url: ops_manager_url,
        browser: browser,
        version_module: Version16,
      )
    end

    def om_rc(ops_manager_url, browser = self)
      @om_1_7 ||= create_web_ui(
        ops_manager_url: ops_manager_url,
        browser: browser,
        version_module: Version17,
      )
    end

    def api_1_4(host:, username:, password:)
      Version14::Api.new(host_uri: host, username: username, password: password)
    end

    def api_1_5(host:, username:, password:)
      Version15::Api.new(host_uri: host, username: username, password: password)
    end

    def api_1_6(host:, username:, password:)
      Version16::Api.new(host_uri: host, username: username, password: password)
    end

    def api_rc(host:, username:, password:)
      Version17::Api.new(host_uri: host, username: username, password: password)
    end

    private

    def create_web_ui(ops_manager_url:, browser:, version_module:)
      Capybara.app_host = ops_manager_url
      Logger.debug "Creating Ops Manager UI Driver for #{version_module.inspect}"
      version_module::WebUi.new(browser: browser)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-1.24.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.23.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.22.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.21.1 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.21.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.20.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.19.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.18.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.17.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.16.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.15.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.14.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.13.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.12.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.11.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.10.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.9.5 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.9.4 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.9.3 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.9.2 lib/ops_manager_ui_drivers/page_helpers.rb