Sha256: 4519682ce835bd472ad5b8f6a06e250b3b18be2e57889deffd75fdfcfb8fbab5

Contents?: true

Size: 1.16 KB

Versions: 3

Compression:

Stored size: 1.16 KB

Contents

require 'ops_manager_ui_drivers/wait_helper'

module OpsManagerUiDrivers
  module PageHelpers
    include OpsManagerUiDrivers::WaitHelper

    def om_1_4(ops_manager_url)
      @om_1_4 ||= create_web_ui(ops_manager_url, Version14)
    end

    def om_1_5(ops_manager_url)
      @om_1_5 ||= create_web_ui(ops_manager_url, Version15)
    end

    def om_1_6(ops_manager_url)
      @om_1_6 ||= create_web_ui(ops_manager_url, Version16)
    end

    def om_rc(ops_manager_url)
      @om_1_7 ||= create_web_ui(ops_manager_url, Version17)
    end

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

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

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

    private

    def create_web_ui(ops_manager_url, version_module)
      Capybara.app_host = ops_manager_url
      puts "Preparing to interact with #{version_module.inspect} at #{Capybara.app_host}"
      version_module::WebUi.new(browser: self)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-1.7.3 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.7.1 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.7.0 lib/ops_manager_ui_drivers/page_helpers.rb