Module: ImportStepThreeMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/calendar.rb
Overview
The page for reviewing activities and confirming them for import.
Instance Method Summary collapse
-
#event_date(event_name) ⇒ Object
Returns the date of the specified event.
-
#events ⇒ Object
Returns an array containing the list of Activity names on the page.
- #import_events ⇒ Object
-
#uncheck_event(event_name) ⇒ Object
Unchecks the checkbox for the specified event.
Instance Method Details
#event_date(event_name) ⇒ Object
Returns the date of the specified event
447 448 449 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 447 def event_date(event_name) frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(event_name)}/)[0].text end |
#events ⇒ Object
Returns an array containing the list of Activity names on the page.
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 430 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 |
#import_events ⇒ Object
424 425 426 427 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 424 def import_events frm.(:value=>"Import Events").click Calendar.new(@browser) end |
#uncheck_event(event_name) ⇒ Object
Unchecks the checkbox for the specified event
452 453 454 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 452 def uncheck_event(event_name) frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(event_name)}/) end |