blob: b6375ba2cbfc05850fc7d56340004789fb7974b1 [file] [log] [blame]
Rahul Maheshwari41747da2020-11-17 09:09:52 -06001#!/usr/bin/python
2
3r"""
4Contains xpaths and related string constants applicable for new Vue based OpenBMC GUI.
5"""
6
7
8class gui_variables():
9
10 # 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']"
23 xpath_server_health_header = "//*[@data-test-id='appHeader-container-health']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060024 xpath_server_power_header = "//*[@data-test-id='appHeader-container-power']"
25 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']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060030 xpath_event_logs_sub_menu = "//*[@data-test-id='nav-item-event-logs']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050031 xpath_event_header = "//h1[text()='Event logs']"
Ashwini Chandrappa71c003f2021-08-26 06:50:46 -050032 xpath_progress_logs_sub_menu = "//*[@data-test-id='nav-item-post-code-logs']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060033
Rahul Maheshwari142642d2021-08-24 00:00:15 -050034 # Hardware status menu
35 xpath_hardware_status_menu = "//*[@data-test-id='nav-button-hardware-status']"
36 xpath_inventory_and_leds_sub_menu = "//*[@data-test-id='nav-item-inventory']"
37 xpath_sensor_sub_menu = "//*[@data-test-id='nav-item-sensors']"
38
39 # Operations menu
40 xpath_operations_menu = "//*[@data-test-id='nav-button-operations']"
Rahul Maheshwari24ae96c2021-06-01 06:58:11 -050041 xpath_factory_reset_sub_menu = "//*[@data-test-id='nav-item-factory-reset']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050042 xpath_firmware_update_sub_menu = "//*[@data-test-id='nav-item-firmware']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060043 xpath_reboot_bmc_sub_menu = "//*[@data-test-id='nav-item-reboot-bmc']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060044 xpath_sol_sub_menu = "//*[@data-test-id='nav-item-serial-over-lan']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050045 xpath_server_power_operations_sub_menu = "//*[@data-test-id='nav-item-server-power-operations']"
46 xpath_sol_console_heading = "//h1[text()='Serial over LAN (SOL) console']"
47
48 # Settings menu
49 xpath_settings_menu = "//*[@data-test-id='nav-button-settings']"
50 xpath_network_page_header = "//h1[contains(text(), 'Network')]"
51 xpath_date_time_sub_menu = "//*[@data-test-id='nav-item-date-time']"
52 xpath_network_sub_menu = "//*[@data-test-id='nav-item-network']"
Ashwini Chandrappa54cffa02021-06-01 06:16:30 -050053 xpath_power_restore_policy_sub_menu = "//*[@data-test-id='nav-item-power-restore-policy']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060054
Rahul Maheshwari142642d2021-08-24 00:00:15 -050055 # Security and access menu
56 xpath_secuity_and_accesss_menu = "//*[@data-test-id='nav-button-security-and-access']"
57 xpath_sessions_sub_menu = "//*[@data-test-id='nav-item-sessions']"
Rahul Maheshwari41747da2020-11-17 09:09:52 -060058 xpath_ldap_sub_menu = "//*[@data-test-id='nav-item-ldap']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050059 xpath_user_management_sub_menu = "//*[@data-test-id='nav-item-user-management']"
60 xpath_policies_sub_menu = "//*[@data-test-id='nav-item-policies']"
61 xpath_certificates_sub_menu = "//*[@data-test-id='nav-item-certificates']"
62
63 # Resource management menu
64 xpath_resource_management_menu = "//*[@data-test-id='nav-button-resource-management']"
65 xpath_power_sub_menu = "//*[@data-test-id='nav-item-power']"
Anusha Dathatri54edcbc2020-12-10 04:04:08 -060066
67 # Profile settings
68 xpath_default_UTC = "//*[@data-test-id='profileSettings-radio-defaultUTC']"
69 xpath_profile_save_button = "//*[@data-test-id='profileSettings-button-saveSettings']"
shrsuman123a9d93412021-07-13 04:06:05 -050070 xpath_input_password = "//*[@data-test-id='profileSettings-input-newPassword']"
71 xpath_input_confirm_password = "//*[@data-test-id='profileSettings-input-confirmPassword']"
Rahul Maheshwari142642d2021-08-24 00:00:15 -050072
73 # Common variables
74 xpath_save_settings_button = "//button[contains(text(),'Save settings')]"
Ashwini Chandrappa233d9652021-08-04 09:56:30 -050075 xpath_confirm_button = "//button[contains(text(),'Confirm')]"