<s> from selenium . webdriver . common import by <EOL> from openstack_dashboard . test . integration_tests . pages import basepage <EOL> from openstack_dashboard . test . integration_tests . pages . settings import changepasswordpage <EOL> from openstack_dashboard . test . integration_tests . regions import forms <EOL> class UsersettingsPage ( basepage . BaseNavigationPage ) : <EOL> DEFAULT_LANGUAGE = "<STR_LIT>" <EOL> DEFAULT_TIMEZONE = "<STR_LIT>" <EOL> DEFAULT_PAGESIZE = "<STR_LIT>" <EOL> DEFAULT_LOGLINES = "<STR_LIT>" <EOL> DEFAULT_SETTINGS = { <EOL> "<STR_LIT>" : DEFAULT_LANGUAGE , <EOL> "<STR_LIT>" : DEFAULT_TIMEZONE , <EOL> "<STR_LIT>" : DEFAULT_PAGESIZE , <EOL> "<STR_LIT>" : DEFAULT_LOGLINES <EOL> } <EOL> SETTINGS_FORM_FIELDS = ( <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) <EOL> _settings_form_locator = ( by . By . ID , '<STR_LIT>' ) <EOL> _change_password_tab_locator = ( by . By . CSS_SELECTOR , <EOL> '<STR_LIT>' ) <EOL> def __init__ ( self , driver , conf ) : <EOL> super ( UsersettingsPage , self ) . __init__ ( driver , conf ) <EOL> self . _page_title = "<STR_LIT>" <EOL> @ property <EOL> def settings_form ( self ) : <EOL> src_elem = self . _get_element ( * self . _settings_form_locator ) <EOL> return forms . FormRegion ( <EOL> self . driver , self . conf , src_elem = src_elem , <EOL> field_mappings = self . SETTINGS_FORM_FIELDS ) <EOL> @ property <EOL> def changepassword ( self ) : <EOL> return changepasswordpage . ChangePasswordPage ( self . driver , self . conf ) <EOL> @ property <EOL> def change_password_tab ( self ) : <EOL> return self . _get_element ( * self . _change_password_tab_locator ) <EOL> def change_language ( self , lang = DEFAULT_LANGUAGE ) : <EOL> self . settings_form . language . value = lang <EOL> self . settings_form . submit ( ) <EOL> def change_timezone ( self , timezone = DEFAULT_TIMEZONE ) : <EOL> self . settings_form . timezone . value = timezone <EOL> self . settings_form . submit ( ) <EOL> def change_pagesize ( self , size = DEFAULT_PAGESIZE ) : <EOL> self . settings_form . pagesize . value = size <EOL> self . settings_form . submit ( ) <EOL> def change_loglines ( self , lines = DEFAULT_LOGLINES ) : <EOL> self . settings_form . instance_log_length . value = lines <EOL> self . settings_form . submit ( ) <EOL> def return_to_default_settings ( self ) : <EOL> self . change_language ( ) <EOL> self . change_timezone ( ) <EOL> self . change_pagesize ( ) <EOL> self . change_loglines ( ) <EOL> def go_to_change_password_page ( self ) : <EOL> self . change_password_tab . click ( ) <EOL> return changepasswordpage . ChangePasswordPage ( self . driver , self . conf ) </s>
