Sha256: 61668a165862fdd2fff200ca07b86cf8ac0e7ed56e021bcd1ea9f048fe4d0367

Contents?: true

Size: 1014 Bytes

Versions: 5

Compression:

Stored size: 1014 Bytes

Contents

##############################################################################
# File::    parameters_page.rb
# Purpose:: Parameters page for AdminModule
#
# Author::    Jeff McAffee 2014-03-19
#
##############################################################################
require 'page-object'
require 'nokogiri'

module AdminModule::Pages

class ParametersPage
  include PageObject

  page_url(:get_dynamic_url)

  def get_dynamic_url
    AdminModule.configuration.url(ParametersPage)
  end

  select_list(:parameters,
              id: 'ctl00_cntPlh_ctlParameters_lstItems')

  button(:modify,
         id: 'ctl00_cntPlh_ctlParameters_btnModify')

  def edit_parameter(var_name)
    parameters_element.select var_name
    self.modify

    # Return the url of the landing page.
    current_url
  end

  def get_parameters
    vars = []
    Nokogiri::HTML(@browser.html).css('#ctl00_cntPlh_ctlParameters_lstItems > option').each do |elem|
      vars << elem.text
    end
    vars
  end
end

end # module Pages

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
admin_module-0.1.8 lib/admin_module/pages/parameters_page.rb
admin_module-0.1.7 lib/admin_module/pages/parameters_page.rb
admin_module-0.1.6 lib/admin_module/pages/parameters_page.rb
admin_module-0.1.5 lib/admin_module/pages/parameters_page.rb
admin_module-0.1.4 lib/admin_module/pages/parameters_page.rb