Module: AddEditSyllabusItemMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/syllabus.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#add_attachments ⇒ Object
Clicks the Add attachments button and instantiates the SyllabusAttach class.
-
#content=(text) ⇒ Object
Sends the specified string to the FCKEditor text area on the page.
-
#editor ⇒ Object
Defines the text area of the FCKEditor that appears on the page for the Syllabus content.
-
#files_list ⇒ Object
Returns an array of the filenames in the attachments table.
-
#post ⇒ Object
Clicks the “Post” button and instantiates the Syllabus Class.
-
#preview ⇒ Object
Clicks the preview button and instantiates the SyllabusPreview class.
Class Method Details
.page_elements(identifier) ⇒ Object
133 134 135 136 137 138 139 140 |
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 133 def self.page_elements(identifier) in_frame(identifier) do |frame| text_field(:title, :id=>"_id4:title", :frame=>frame) (:only_members_of_this_site) { |page| page.(:name=>/_id\d+:_id\d+/, :value=>"no", :frame=>frame) } (:publicly_viewable) { |page| page.(:name=>/_id\d+:_id\d+/, :value=>"yes", :frame=>frame) } end end |
Instance Method Details
#add_attachments ⇒ Object
Clicks the Add attachments button and instantiates the SyllabusAttach class.
109 110 111 112 |
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 109 def frm.(:value=>"Add attachments").click SyllabusAttach.new(@browser) end |
#content=(text) ⇒ Object
Sends the specified string to the FCKEditor text area on the page.
103 104 105 |
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 103 def content=(text) editor.send_keys(text) end |
#editor ⇒ Object
Defines the text area of the FCKEditor that appears on the page for the Syllabus content.
98 99 100 |
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 98 def editor frm.frame(:id, /_textarea___Frame/).td(:id, "xEditingArea").frame(:index=>0) end |
#files_list ⇒ Object
Returns an array of the filenames in the attachments table
116 117 118 119 120 121 122 123 124 |
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 116 def files_list names = [] frm.table(:class=>"listHier lines nolines").rows.each do |row| if row.td(:class=>"item").exist? names << row.td(:class=>"item").h4.text end end return names end |
#post ⇒ Object
Clicks the “Post” button and instantiates the Syllabus Class.
91 92 93 94 |
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 91 def post frm.(:value=>"Post").click SyllabusEdit.new(@browser) end |
#preview ⇒ Object
Clicks the preview button and instantiates the SyllabusPreview class
128 129 130 131 |
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 128 def preview frm.(:value=>"Preview").click SyllabusPreview.new(@browser) end |