Class: AddEditFields
- Inherits:
-
CalendarBase
- Object
- PageMaker
- BasePage
- CalendarBase
- AddEditFields
- Defined in:
- lib/sakai-cle-test-api/page_objects/calendar.rb
Instance Method Summary collapse
-
#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.
Methods inherited from CalendarBase
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
#check_remove(field_name) ⇒ Object
Checks the checkbox for the specified field
356 357 358 |
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 356 def check_remove(field_name) frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(field_name)}/).checkbox.set end |
#create_field ⇒ Object
350 351 352 353 |
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 350 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.
339 340 341 342 343 344 345 346 347 348 |
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 339 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 |