Class: ImportStepThree

Inherits:
BasePage show all
Defined in:
lib/sakai-cle-test-api/page_objects/calendar.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

#event_date(event_name) ⇒ Object

Returns the date of the specified event



419
420
421
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 419

def event_date(event_name)
  frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(event_name)}/)[0].text
end

#eventsObject

Returns an array containing the list of Activity names on the page.



402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 402

def events
  list = []
  frm.table(:class=>/listHier lines/).rows.each do |row|
    if row.label(:for=>/eventSelected/).exist?
      list << row.label.text
    end
  end
  names = []
  list.uniq!
  list.each do | item |
    name = item[/(?<=\s).+(?=\s\s\()/]
    names << name
  end
  return names
end

#uncheck_event(event_name) ⇒ Object

Unchecks the checkbox for the specified event



424
425
426
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 424

def uncheck_event(event_name)
  frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(event_name)}/)
end