Module: PageHelper
- Included in:
- AnnouncementObject, AssessmentObject, AssignmentObject, CitationListObject, ContentSectionObject, EventObject, FileObject, FolderObject, ForumObject, HTMLPageObject, MessageFolderObject, MessageObject, ModuleObject, SiteObject, SyllabusObject, TextDocumentObject, WebContentObject, WebLinkObject, WikiObject
- Defined in:
- lib/sakai-cle-test-api/page_helper.rb
Instance Method Summary collapse
- #make(data_object_class, opts = {}) ⇒ Object
- #on(page_class, visit = false, &block) ⇒ Object (also: #on_page)
- #visit(page_class, &block) ⇒ Object
- #wait_until(timeout = 30, message = nil, &block) ⇒ Object
Instance Method Details
#make(data_object_class, opts = {}) ⇒ Object
14 15 16 |
# File 'lib/sakai-cle-test-api/page_helper.rb', line 14 def make data_object_class, opts={} data_object_class.new @browser, opts end |
#on(page_class, visit = false, &block) ⇒ Object Also known as: on_page
7 8 9 10 11 |
# File 'lib/sakai-cle-test-api/page_helper.rb', line 7 def on page_class, visit=false, &block @current_page = page_class.new @browser, visit block.call @current_page if block @current_page end |
#visit(page_class, &block) ⇒ Object
3 4 5 |
# File 'lib/sakai-cle-test-api/page_helper.rb', line 3 def visit page_class, &block on page_class, true, &block end |
#wait_until(timeout = 30, message = nil, &block) ⇒ Object
18 19 20 |
# File 'lib/sakai-cle-test-api/page_helper.rb', line 18 def wait_until(timeout=30, =nil, &block) Object::Watir::Wait.until(timeout, , &block) end |