Module: AddEditFieldsMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/calendar.rb
Instance Method Summary collapse
-
#alert_box ⇒ Object
Returns a string of the contents of the Alert box.
-
#check_remove(field_name) ⇒ Object
Checks the checkbox for the specified field.
- #create_field ⇒ Object
-
#save_field_changes ⇒ Object
Clicks the Save Field Changes buton and instantiates The Calendar or EventDetail class–unless the Alert Message box appears, in which case it re-instantiates the class.
Instance Method Details
#alert_box ⇒ Object
Returns a string of the contents of the Alert box.
367 368 369 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 367 def alert_box frm.div(:class=>"alertMessage").text end |
#check_remove(field_name) ⇒ Object
Checks the checkbox for the specified field
377 378 379 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 377 def check_remove(field_name) frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(field_name)}/).checkbox.set end |
#create_field ⇒ Object
371 372 373 374 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 371 def create_field frm.(:value=>"Create Field").click AddEditFields.new(@browser) end |
#save_field_changes ⇒ Object
Clicks the Save Field Changes buton and instantiates The Calendar or EventDetail class–unless the Alert Message box appears, in which case it re-instantiates the class.
355 356 357 358 359 360 361 362 363 364 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 355 def save_field_changes frm.(:value=>"Save Field Changes").click if frm.div(:class=>"alertMessage").exist? AddEditFields.new(@browser) elsif frm.(:value=>"Back to Calendar").exist? EventDetail.new(@browser) else Calendar.new(@browser) end end |