Class: Login
- Defined in:
- lib/sakai-cle-test-api/page_objects/login.rb
Overview
This is the page where users log in to the site.
Instance Method Summary collapse
-
#login(username, password) ⇒ Object
(also: #log_in, #sign_in)
Logs in to Sakai using the specified credentials.
- #search_public_courses_and_projects ⇒ Object
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
#login(username, password) ⇒ Object Also known as: log_in, sign_in
Logs in to Sakai using the specified credentials. Then it instantiates the MyWorkspace class.
18 19 20 21 22 23 24 |
# File 'lib/sakai-cle-test-api/page_objects/login.rb', line 18 def login(username, password) frame = @browser.frame(:id, "ifrm") frame.text_field(:id, "eid").set username frame.text_field(:id, "pw").set password frame.form(:method, "post").submit return MyWorkspace.new(@browser) end |
#search_public_courses_and_projects ⇒ Object
10 11 12 13 |
# File 'lib/sakai-cle-test-api/page_objects/login.rb', line 10 def search_public_courses_and_projects @browser.frame(:index=>0).link(:text=>"Search Public Courses and Projects").click SearchPublic.new(@browser) end |