Class: OpsManagerUiDrivers::Version15::ProductConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/ops_manager_ui_drivers/version15/product_configuration.rb

Instance Method Summary collapse

Constructor Details

#initialize(browser:, product_name:) ⇒ ProductConfiguration

Returns a new instance of ProductConfiguration.



6
7
8
9
# File 'lib/ops_manager_ui_drivers/version15/product_configuration.rb', line 6

def initialize(browser:, product_name:)
  @browser = browser
  @product_name = product_name
end

Instance Method Details

#product_form(form_name) ⇒ Object



20
21
22
# File 'lib/ops_manager_ui_drivers/version15/product_configuration.rb', line 20

def product_form(form_name)
  Version15::ProductForm.new(browser: browser, product_name: product_name, form_name: form_name)
end

#upload_stemcell(stemcell_file_path) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/ops_manager_ui_drivers/version15/product_configuration.rb', line 11

def upload_stemcell(stemcell_file_path)
  visit_product_page
  browser.click_on "show-#{product_name}-stemcell-assignment-action"
  browser.attach_file('product_stemcell[file]', stemcell_file_path, {visible: false})
  browser.wait {
    browser.has_text?("Stemcell '#{File.basename(stemcell_file_path)}' has been uploaded successfully.")
  }
end