Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | |
| 3 | r""" |
| 4 | Contains xpaths and related string constants applicable for new Vue based OpenBMC GUI. |
| 5 | """ |
| 6 | |
| 7 | |
| 8 | class gui_variables(): |
| 9 | |
| 10 | # Login page |
| 11 | xpath_textbox_hostname = "//input[@id='host']" |
Rahul Maheshwari | e5d9c31 | 2021-01-31 23:56:20 -0600 | [diff] [blame] | 12 | xpath_textbox_username = "//*[@data-test-id='login-input-username']" |
| 13 | xpath_textbox_password = "//*[@data-test-id='login-input-password']" |
| 14 | xpath_login_button = "//*[@data-test-id='login-button-submit']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 15 | xpath_logout_button = "//*[@data-test-id='appHeader-link-logout']" |
| 16 | |
| 17 | # Overview menu |
| 18 | xpath_overview_menu = "//*[@data-test-id='nav-item-overview']" |
| 19 | |
| 20 | # GUI header |
Rahul Maheshwari | e5d9c31 | 2021-01-31 23:56:20 -0600 | [diff] [blame] | 21 | xpath_root_button_menu = "//*[@data-test-id='appHeader-container-user']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 22 | xpath_profile_settings = "//*[@data-test-id='appHeader-link-profile']" |
| 23 | xpath_server_health_header = "//*[@data-test-id='appHeader-container-health']" |
| 24 | xpath_event_header = "//h1[text()='Event logs']" |
| 25 | xpath_server_power_header = "//*[@data-test-id='appHeader-container-power']" |
| 26 | xpath_refresh_button = "//*[@data-test-id='appHeader-button-refresh']" |
| 27 | xpath_network_page_header = "//h1[contains(text(), 'Network settings')]" |
| 28 | xpath_sol_header = "//h1[contains(text(), 'Serial over LAN console')]" |
| 29 | xpath_sol_console_heading = "//h1[text()='Serial over LAN (SOL) console']" |
| 30 | |
| 31 | # Health menu |
| 32 | xpath_health_menu = "//*[@data-test-id='nav-button-health']" |
Rahul Maheshwari | bce8f71 | 2021-06-01 06:26:48 -0500 | [diff] [blame] | 33 | xpath_dumps_sub_menu = "//*[@data-test-id='nav-item-dumps']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 34 | xpath_event_logs_sub_menu = "//*[@data-test-id='nav-item-event-logs']" |
| 35 | xpath_sensor_sub_menu = "//*[@data-test-id='nav-item-sensors']" |
| 36 | xpath_hardware_status_sub_menu = "//*[@data-test-id='nav-item-hardware-status']" |
| 37 | |
| 38 | # Control menu |
| 39 | xpath_control_menu = "//*[@data-test-id='nav-button-control']" |
Rahul Maheshwari | 24ae96c | 2021-06-01 06:58:11 -0500 | [diff] [blame] | 40 | xpath_factory_reset_sub_menu = "//*[@data-test-id='nav-item-factory-reset']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 41 | xpath_manage_power_usage_sub_menu = "//*[@data-test-id='nav-item-manage-power-usage']" |
| 42 | xpath_reboot_bmc_sub_menu = "//*[@data-test-id='nav-item-reboot-bmc']" |
| 43 | xpath_server_led_sub_menu = "//*[@data-test-id='nav-item-server-led']" |
| 44 | xpath_server_power_operations_sub_menu = "//*[@data-test-id='nav-item-server-power-operations']" |
| 45 | xpath_sol_sub_menu = "//*[@data-test-id='nav-item-serial-over-lan']" |
| 46 | xpath_kvm_sub_menu = "//*[@data-test-id='nav-item-kvm']" |
Ashwini Chandrappa | 54cffa0 | 2021-06-01 06:16:30 -0500 | [diff] [blame] | 47 | xpath_power_restore_policy_sub_menu = "//*[@data-test-id='nav-item-power-restore-policy']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 48 | |
| 49 | # Configuration menu |
| 50 | xpath_server_configuration = "//*[@data-test-id='nav-button-configuration']" |
| 51 | xpath_select_network_settings = "//*[@data-test-id='nav-item-network-settings']" |
| 52 | xpath_date_time_settings_sub_menu = "//*[@data-test-id='nav-item-date-time-settings']" |
| 53 | xpath_firmware_update_sub_menu = "//*[@data-test-id='nav-item-firmware']" |
| 54 | |
| 55 | # Access control menu |
| 56 | xpath_access_control_menu = "//*[@data-test-id='nav-button-access-control']" |
Rahul Maheshwari | 275ab30 | 2021-06-01 07:15:48 -0500 | [diff] [blame] | 57 | xpath_client_sessions_sub_menu = "//*[@data-test-id='nav-item-client-sessions']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 58 | xpath_ldap_sub_menu = "//*[@data-test-id='nav-item-ldap']" |
| 59 | xpath_save_settings_button = "//button[contains(text(),'Save settings')]" |
| 60 | xpath_local_user_management_sub_menu = "//*[@data-test-id='nav-item-local-user-management']" |
| 61 | xpath_ssl_certificates_sub_menu = "//*[@data-test-id='nav-item-ssl-certificates']" |
Anusha Dathatri | 54edcbc | 2020-12-10 04:04:08 -0600 | [diff] [blame] | 62 | |
| 63 | # Profile settings |
| 64 | xpath_default_UTC = "//*[@data-test-id='profileSettings-radio-defaultUTC']" |
| 65 | xpath_profile_save_button = "//*[@data-test-id='profileSettings-button-saveSettings']" |
shrsuman123 | a9d9341 | 2021-07-13 04:06:05 -0500 | [diff] [blame] | 66 | xpath_input_password = "//*[@data-test-id='profileSettings-input-newPassword']" |
| 67 | xpath_input_confirm_password = "//*[@data-test-id='profileSettings-input-confirmPassword']" |