blob: 0fe686a6bd6acd751b9caa892a1db9e761bbc43c [file] [log] [blame]
George Keishinge7e91712021-09-03 11:28:44 -05001#!/usr/bin/env python3
Rahul Maheshwari41747da2020-11-17 09:09:52 -06002
3r"""
4Contains xpaths and related string constants applicable for new Vue based OpenBMC GUI.
5"""
6
7
George Keishinge635ddc2022-12-08 07:38:02 -06008class gui_variables():
9
Rahul Maheshwari41747da2020-11-17 09:09:52 -060010 # Login page
11 xpath_textbox_hostname = "//input[@id='host']"
Rahul Maheshwarie5d9c312021-01-31 23:56:20 -060012 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 Maheshwari41747da2020-11-17 09:09:52 -060015 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 Maheshwarie5d9c312021-01-31 23:56:20 -060021 xpath_root_button_menu = "//*[@data-test-id='appHeader-container-user']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060022 xpath_profile_settings = "//*[@data-test-id='appHeader-link-profile']"
George Keishinge635ddc2022-12-08 07:38:02 -060023 xpath_server_health_header = "//*[@data-test-id='appHeader-container-health']"
24 xpath_server_power_header = "//*[@data-test-id='appHeader-container-power']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060025 xpath_refresh_button = "//*[@data-test-id='appHeader-button-refresh']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060026
Rahul Maheshwari142642d2021-08-24 00:00:15 -050027 # Logs menu
28 xpath_logs_menu = "//*[@data-test-id='nav-button-logs']"
Rahul Maheshwaribce8f712021-06-01 06:26:48 -050029 xpath_dumps_sub_menu = "//*[@data-test-id='nav-item-dumps']"
rramyasr-in305d23a2022-01-19 01:32:04 -060030 xpath_dumps_header = "//h1[text()='Dumps']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060031 xpath_event_logs_sub_menu = "//*[@data-test-id='nav-item-event-logs']"
rramyasr-ind3b3fcd2022-11-18 10:41:14 -060032 xpath_event_logs_heading = "//h1[contains(text(), 'Event logs')]"
George Keishinge635ddc2022-12-08 07:38:02 -060033 xpath_progress_logs_sub_menu = "//*[@data-test-id='nav-item-post-code-logs']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060034
Rahul Maheshwari142642d2021-08-24 00:00:15 -050035 # Hardware status menu
George Keishinge635ddc2022-12-08 07:38:02 -060036 xpath_hardware_status_menu = "//*[@data-test-id='nav-button-hardware-status']"
37 xpath_inventory_and_leds_sub_menu = "//*[@data-test-id='nav-item-inventory']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050038 xpath_sensor_sub_menu = "//*[@data-test-id='nav-item-sensors']"
George Keishinge635ddc2022-12-08 07:38:02 -060039 xpath_inventory_and_leds_heading = "//h1[contains(text(), 'Inventory and LEDs')]"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050040
41 # Operations menu
42 xpath_operations_menu = "//*[@data-test-id='nav-button-operations']"
George Keishinge635ddc2022-12-08 07:38:02 -060043 xpath_factory_reset_sub_menu = "//*[@data-test-id='nav-item-factory-reset']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050044 xpath_firmware_update_sub_menu = "//*[@data-test-id='nav-item-firmware']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060045 xpath_reboot_bmc_sub_menu = "//*[@data-test-id='nav-item-reboot-bmc']"
rramyasr-inc7487402022-06-28 12:23:50 -050046 xpath_host_console_sub_menu = "//*[@data-test-id='nav-item-host-console']"
George Keishinge635ddc2022-12-08 07:38:02 -060047 xpath_server_power_operations_sub_menu = "//*[@data-test-id='nav-item-server-power-operations']"
rramyasr-in70178952022-06-17 06:17:30 -050048 xpath_host_console_heading = "//h1[text()='Host console']"
rramyasr-ind3b3fcd2022-11-18 10:41:14 -060049 xpath_firmware_heading = "//h1[contains(text(), 'Firmware')]"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050050
51 # Settings menu
52 xpath_settings_menu = "//*[@data-test-id='nav-button-settings']"
rramyasr-ind3b3fcd2022-11-18 10:41:14 -060053 xpath_network_heading = "//h1[text()='Network']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050054 xpath_date_time_sub_menu = "//*[@data-test-id='nav-item-date-time']"
55 xpath_network_sub_menu = "//*[@data-test-id='nav-item-network']"
George Keishinge635ddc2022-12-08 07:38:02 -060056 xpath_power_restore_policy_sub_menu = "//*[@data-test-id='nav-item-power-restore-policy']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060057
Rahul Maheshwari142642d2021-08-24 00:00:15 -050058 # Security and access menu
George Keishinge635ddc2022-12-08 07:38:02 -060059 xpath_secuity_and_accesss_menu = "//*[@data-test-id='nav-button-security-and-access']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050060 xpath_sessions_sub_menu = "//*[@data-test-id='nav-item-sessions']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060061 xpath_ldap_sub_menu = "//*[@data-test-id='nav-item-ldap']"
George Keishinge635ddc2022-12-08 07:38:02 -060062 xpath_user_management_sub_menu = "//*[@data-test-id='nav-item-user-management']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050063 xpath_policies_sub_menu = "//*[@data-test-id='nav-item-policies']"
64 xpath_certificates_sub_menu = "//*[@data-test-id='nav-item-certificates']"
65
66 # Resource management menu
George Keishinge635ddc2022-12-08 07:38:02 -060067 xpath_resource_management_menu = "//*[@data-test-id='nav-button-resource-management']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050068 xpath_power_sub_menu = "//*[@data-test-id='nav-item-power']"
rramyasr-ind3b3fcd2022-11-18 10:41:14 -060069 xpath_power_heading = "//h1[contains(text(), 'Power')]"
Anusha Dathatri54edcbc2020-12-10 04:04:08 -060070
71 # Profile settings
72 xpath_default_UTC = "//*[@data-test-id='profileSettings-radio-defaultUTC']"
George Keishinge635ddc2022-12-08 07:38:02 -060073 xpath_profile_save_button = "//*[@data-test-id='profileSettings-button-saveSettings']"
74 xpath_input_password = "//*[@data-test-id='profileSettings-input-newPassword']"
75 xpath_input_confirm_password = "//*[@data-test-id='profileSettings-input-confirmPassword']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050076
77 # Common variables
rramyasr-in2da4d6f2022-11-07 04:31:24 -060078 xpath_save_settings_button = "//button[contains(text(),'Save')]"
Ashwini Chandrappa233d9652021-08-04 09:56:30 -050079 xpath_confirm_button = "//button[contains(text(),'Confirm')]"
meghagn2052fdd2021-12-07 02:42:31 -060080 xpath_cancel_button = "//button[contains(text(),'Cancel')]"
meghagn97f7eb42022-03-02 02:59:35 -060081 xpath_add_button = "//button[normalize-space(text())='Add']"
George Keishinge635ddc2022-12-08 07:38:02 -060082 xpath_page_loading_progress_bar = "//*[@aria-label='Page loading progress bar']"
rramyasr-in2da4d6f2022-11-07 04:31:24 -060083
rramyasr-in732cc3f2022-11-16 05:30:57 -060084 # Reboot sub menu
meghagn2052fdd2021-12-07 02:42:31 -060085 xpath_reboot_bmc_heading = "//h1[text()='Reboot BMC']"
86 xpath_reboot_bmc_button = "//button[contains(text(),'Reboot BMC')]"
87 xpath_confirm_bmc_reboot = "//*[@class='btn btn-primary']"