Module: SectionsMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/sections.rb
Overview
Topmost page for Sections in Site Management
Instance Method Summary collapse
- #alert_text ⇒ Object
- #assign_students(title) ⇒ Object
- #assign_tas(title) ⇒ Object
- #availability_for(title) ⇒ Object
- #check(title) ⇒ Object
- #current_size_for(title) ⇒ Object
- #days_for(title) ⇒ Object
-
#edit(title) ⇒ Object
Clicks the Edit link for the specified section.
- #location_for(title) ⇒ Object
- #remove_sections ⇒ Object
- #section_names ⇒ Object
- #success_text ⇒ Object
-
#tas_for(title) ⇒ Object
Returns the text of the Teach Assistant cell for the specified Section.
- #time_for(title) ⇒ Object
Instance Method Details
#alert_text ⇒ Object
101 102 103 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 101 def alert_text frm.div(:class=>"validation").text end |
#assign_students(title) ⇒ Object
46 47 48 49 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 46 def assign_students(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/).link(:text=>/Assign Students/).click AssignStudents.new(@browser) end |
#assign_tas(title) ⇒ Object
41 42 43 44 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 41 def assign_tas(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/).link(:text=>/Assign TAs/).click AssignTeachingAssistants.new(@browser) end |
#availability_for(title) ⇒ Object
97 98 99 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 97 def availability_for(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/)[6].text end |
#check(title) ⇒ Object
51 52 53 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 51 def check(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/).checkbox(:name=>/remove/).set end |
#current_size_for(title) ⇒ Object
92 93 94 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 92 def current_size_for(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/)[5].text end |
#days_for(title) ⇒ Object
77 78 79 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 77 def days_for(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/)[2].text end |
#edit(title) ⇒ Object
Clicks the Edit link for the specified section. Then instantiates the AddEditSections class.
36 37 38 39 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 36 def edit(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/).link(:text=>/Edit/).click AddEditSections.new(@browser) end |
#location_for(title) ⇒ Object
87 88 89 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 87 def location_for(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/)[4].text end |
#remove_sections ⇒ Object
65 66 67 68 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 65 def remove_sections frm.(:value=>"Remove Sections").click Sections.new(@browser) end |
#section_names ⇒ Object
55 56 57 58 59 60 61 62 63 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 55 def section_names names = [] frm.table(:class=>/listHier/).rows.each do |row| if row.td(:class=>"leftIndent").exist? names << row.td(:class=>"leftIndent").div(:index=>0).text end end return names end |
#success_text ⇒ Object
105 106 107 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 105 def success_text frm.div(:class=>"success").text end |
#tas_for(title) ⇒ Object
Returns the text of the Teach Assistant cell for the specified Section.
72 73 74 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 72 def tas_for(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/)[1].text end |
#time_for(title) ⇒ Object
82 83 84 |
# File 'lib/kuali-sakai-common-lib/sections.rb', line 82 def time_for(title) frm.table(:class=>/listHier/).row(:text=>/#{Regexp.escape(title)}/)[3].text end |