George Keishing | e7e9171 | 2021-09-03 11:28:44 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 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']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 24 | xpath_server_power_header = "//*[@data-test-id='appHeader-container-power']" |
| 25 | xpath_refresh_button = "//*[@data-test-id='appHeader-button-refresh']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 26 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 27 | # Logs menu |
| 28 | xpath_logs_menu = "//*[@data-test-id='nav-button-logs']" |
Rahul Maheshwari | bce8f71 | 2021-06-01 06:26:48 -0500 | [diff] [blame] | 29 | xpath_dumps_sub_menu = "//*[@data-test-id='nav-item-dumps']" |
rramyasr-in | 305d23a | 2022-01-19 01:32:04 -0600 | [diff] [blame] | 30 | xpath_dumps_header = "//h1[text()='Dumps']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 31 | xpath_event_logs_sub_menu = "//*[@data-test-id='nav-item-event-logs']" |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 32 | xpath_event_header = "//h1[text()='Event logs']" |
Ashwini Chandrappa | 71c003f | 2021-08-26 06:50:46 -0500 | [diff] [blame] | 33 | xpath_progress_logs_sub_menu = "//*[@data-test-id='nav-item-post-code-logs']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 34 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 35 | # Hardware status menu |
| 36 | xpath_hardware_status_menu = "//*[@data-test-id='nav-button-hardware-status']" |
| 37 | xpath_inventory_and_leds_sub_menu = "//*[@data-test-id='nav-item-inventory']" |
| 38 | xpath_sensor_sub_menu = "//*[@data-test-id='nav-item-sensors']" |
| 39 | |
| 40 | # Operations menu |
| 41 | xpath_operations_menu = "//*[@data-test-id='nav-button-operations']" |
Rahul Maheshwari | 24ae96c | 2021-06-01 06:58:11 -0500 | [diff] [blame] | 42 | xpath_factory_reset_sub_menu = "//*[@data-test-id='nav-item-factory-reset']" |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 43 | xpath_firmware_update_sub_menu = "//*[@data-test-id='nav-item-firmware']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 44 | xpath_reboot_bmc_sub_menu = "//*[@data-test-id='nav-item-reboot-bmc']" |
rramyasr-in | c748740 | 2022-06-28 12:23:50 -0500 | [diff] [blame] | 45 | xpath_host_console_sub_menu = "//*[@data-test-id='nav-item-host-console']" |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 46 | xpath_server_power_operations_sub_menu = "//*[@data-test-id='nav-item-server-power-operations']" |
rramyasr-in | 7017895 | 2022-06-17 06:17:30 -0500 | [diff] [blame] | 47 | xpath_host_console_heading = "//h1[text()='Host console']" |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 48 | |
| 49 | # Settings menu |
| 50 | xpath_settings_menu = "//*[@data-test-id='nav-button-settings']" |
| 51 | xpath_network_page_header = "//h1[contains(text(), 'Network')]" |
| 52 | xpath_date_time_sub_menu = "//*[@data-test-id='nav-item-date-time']" |
| 53 | xpath_network_sub_menu = "//*[@data-test-id='nav-item-network']" |
Ashwini Chandrappa | 54cffa0 | 2021-06-01 06:16:30 -0500 | [diff] [blame] | 54 | 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] | 55 | |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 56 | # Security and access menu |
| 57 | xpath_secuity_and_accesss_menu = "//*[@data-test-id='nav-button-security-and-access']" |
| 58 | xpath_sessions_sub_menu = "//*[@data-test-id='nav-item-sessions']" |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 59 | xpath_ldap_sub_menu = "//*[@data-test-id='nav-item-ldap']" |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 60 | xpath_user_management_sub_menu = "//*[@data-test-id='nav-item-user-management']" |
| 61 | xpath_policies_sub_menu = "//*[@data-test-id='nav-item-policies']" |
| 62 | xpath_certificates_sub_menu = "//*[@data-test-id='nav-item-certificates']" |
| 63 | |
| 64 | # Resource management menu |
| 65 | xpath_resource_management_menu = "//*[@data-test-id='nav-button-resource-management']" |
| 66 | xpath_power_sub_menu = "//*[@data-test-id='nav-item-power']" |
Anusha Dathatri | 54edcbc | 2020-12-10 04:04:08 -0600 | [diff] [blame] | 67 | |
| 68 | # Profile settings |
| 69 | xpath_default_UTC = "//*[@data-test-id='profileSettings-radio-defaultUTC']" |
| 70 | xpath_profile_save_button = "//*[@data-test-id='profileSettings-button-saveSettings']" |
shrsuman123 | a9d9341 | 2021-07-13 04:06:05 -0500 | [diff] [blame] | 71 | xpath_input_password = "//*[@data-test-id='profileSettings-input-newPassword']" |
| 72 | xpath_input_confirm_password = "//*[@data-test-id='profileSettings-input-confirmPassword']" |
Rahul Maheshwari | 142642d | 2021-08-24 00:00:15 -0500 | [diff] [blame] | 73 | |
| 74 | # Common variables |
| 75 | xpath_save_settings_button = "//button[contains(text(),'Save settings')]" |
Ashwini Chandrappa | 233d965 | 2021-08-04 09:56:30 -0500 | [diff] [blame] | 76 | xpath_confirm_button = "//button[contains(text(),'Confirm')]" |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 77 | xpath_cancel_button = "//button[contains(text(),'Cancel')]" |
meghagn | 97f7eb4 | 2022-03-02 02:59:35 -0600 | [diff] [blame] | 78 | xpath_add_button = "//button[normalize-space(text())='Add']" |
rramyasr-in | 6aa10f5 | 2022-08-26 05:42:32 -0500 | [diff] [blame] | 79 | xpath_page_loading_progress_bar = "//*[@aria-label='Page loading progress bar']" |
meghagn | 2052fdd | 2021-12-07 02:42:31 -0600 | [diff] [blame] | 80 | # Reboot sub meanu |
| 81 | xpath_reboot_bmc_heading = "//h1[text()='Reboot BMC']" |
| 82 | xpath_reboot_bmc_button = "//button[contains(text(),'Reboot BMC')]" |
| 83 | xpath_confirm_bmc_reboot = "//*[@class='btn btn-primary']" |