Class: OpsManagerUiDrivers::Version17::AvailableProducts

Inherits:
Object
  • Object
show all
Includes:
WaitHelper
Defined in:
lib/ops_manager_ui_drivers/version17/available_products.rb

Constant Summary

Constants included from WaitHelper

WaitHelper::EarlyFailException, WaitHelper::SLEEP_INTERVAL

Instance Method Summary collapse

Methods included from WaitHelper

#fail_early, #poll_up_to_mins, #poll_up_to_times

Constructor Details

#initialize(browser:) ⇒ AvailableProducts

Returns a new instance of AvailableProducts.



8
9
10
# File 'lib/ops_manager_ui_drivers/version17/available_products.rb', line 8

def initialize(browser:)
  @browser = browser
end

Instance Method Details

#add_product_to_install(product_name) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/ops_manager_ui_drivers/version17/available_products.rb', line 12

def add_product_to_install(product_name)
  browser.visit '/'
  poll_up_to_times 3 do
    browser.click_on "add-#{product_name}"
    browser.find("#show-#{product_name.dasherize}-configure-action")
  end
end

#product_added?(product_name) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
23
# File 'lib/ops_manager_ui_drivers/version17/available_products.rb', line 20

def product_added?(product_name)
  browser.visit '/'
  browser.all("#show-#{product_name.dasherize}-configure-action").any?
end