cfme.login module

Provides functions to login as any user

Also provides a convenience function for logging in as admin using the credentials in the cfme yamls.

var page:A cfme.web_ui.Region holding locators on the login page
cfme.login.clear_fields()[source]

clears all form fields

cfme.login.click_on_login()[source]

Convenience internal function to click the login locator submit button.

cfme.login.close_password_update_form()[source]

Goes back to main login form on login page

cfme.login.current_full_name()[source]

Returns the current username.

Returns: the current username.

cfme.login.current_user()[source]
cfme.login.current_username()[source]
cfme.login.fill_login_fields(username, password)[source]

Fills in login information without submitting the form

cfme.login.logged_in()[source]
cfme.login.login(user, submit_method=<function _js_auth_fn at 0x7f4d233b6140>)[source]

Login to CFME with the given username and password. Optionally, submit_method can be press_enter_after_password to use the enter key to login, rather than clicking the button.

Parameters:
  • user – The username to fill in the username field.
  • password – The password to fill in the password field.
  • submit_method – A function to call after the username and password have been input.
Raises:

RuntimeError – If the login fails, ie. if a flash message appears

cfme.login.login_admin(**kwargs)[source]

Convenience function to log into CFME using the admin credentials from the yamls.

Parameters:kwargs – A dict of keyword arguments to supply to the login() method.
cfme.login.logout()[source]

Logs out of CFME.

cfme.login.press_enter_after_password()[source]

Convenience function to send a carriange return at the end of the password field.

cfme.login.show_password_update_form()[source]

Shows the password update form

cfme.login.update_password(username, password, new_password, verify_password=None, submit_method=<function click_on_login at 0x7f4d233b66e0>)[source]

Changes user password