Class: EntityPicker

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

Instance Method Summary collapse

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

#close_pickerObject



19
20
21
22
23
# File 'lib/sakai-cle-test-api/page_objects/entity_picker.rb', line 19

def close_picker
  self.window.close
  self.window(:index=>0).use
  self.frame(:index=>2).button(:id=>"btnCancel").click
end

#select_assignment(title) ⇒ Object



12
13
14
15
16
17
# File 'lib/sakai-cle-test-api/page_objects/entity_picker.rb', line 12

def select_assignment(title)
  view_assignment_details(title)
  self.link(:text=>"Select this item").click
  self.window(:index=>0).use
  self.frame(:index=>2).button(:id=>"btnOk").click
end

#view_assignment_details(title) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/sakai-cle-test-api/page_objects/entity_picker.rb', line 3

def view_assignment_details(title)
  unless self.div(:class=>"title", :text=>title).present?
    self.link(:text=>"Assignments").click
    self.link(:text=>title).wait_until_present
    self.link(:text=>title).click
  end
  self.div(:class=>"title", :text=>title).wait_until_present
end