Class: PoolImport

Inherits:
AssessmentsBase show all
Defined in:
lib/sakai-cle-test-api/page_objects/assessments.rb

Overview

The page that appears when you click to import a pool.

Instance Method Summary collapse

Methods inherited from AssessmentsBase

menu_bar_elements, pool_page_elements, question_page_elements

Methods inherited from BasePage

basic_page_elements, frame_element

Methods inherited from PageMaker

element, expected_element, expected_title, #initialize, #method_missing, page_url

Constructor Details

This class inherits a constructor from PageMaker

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PageMaker

Instance Method Details

#choose_file(file_name, file_path = "") ⇒ Object

Enters the target file into the Choose File file field. Including the file path separately is optional.

Parameters:

  • file_name (String)

    the name of the file you want to choose. Can include path info, if desired.

  • file_path (String) (defaults to: "")

    Optional. This is the path information for the file location.



689
690
691
# File 'lib/sakai-cle-test-api/page_objects/assessments.rb', line 689

def choose_file(file_name, file_path="")
  frm.file_field(:name=>"importPoolForm:_id6.upload").set(file_path + file_name)
end

#importObject

Clicks the Import button, then instantiates the QuestionPoolsList page class.



696
697
698
699
# File 'lib/sakai-cle-test-api/page_objects/assessments.rb', line 696

def import
  frm.button(:value=>"Import").click
  QuestionPoolsList.new(@browser)
end