| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 1 | *** Settings *** | 
|  | 2 | Documentation  This is a resource file of OpenBMC ASMI It contains the | 
|  | 3 | ...            user-defined keywords which are available to all gui modules | 
|  | 4 |  | 
|  | 5 | Library      String | 
|  | 6 | Library      Collections | 
|  | 7 | Library      DateTime | 
|  | 8 | Library      XvfbRobot | 
|  | 9 | Library      OperatingSystem | 
| Rahul Maheshwari | 2b666cc | 2019-09-02 23:53:37 -0500 | [diff] [blame] | 10 | Library      SeleniumLibrary | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 11 | Library      AngularJSLibrary | 
|  | 12 | Library      SSHLibrary  30 Seconds | 
|  | 13 | Library      Process | 
|  | 14 | Library      supporting_libs.py | 
| Rahul Maheshwari | 439ce71 | 2019-03-07 03:23:13 -0600 | [diff] [blame] | 15 | Library      ../../lib/gen_print.py | 
|  | 16 | Library      ../../lib/gen_robot_print.py | 
|  | 17 | Library      ../../lib/gen_valid.py | 
|  | 18 | Library      ../../lib/gen_robot_ssh.py | 
|  | 19 | Library      ../../lib/bmc_ssh_utils.py | 
|  | 20 | Resource     ../../lib/resource.robot | 
|  | 21 | Resource     ../../lib/rest_client.robot | 
|  | 22 | Resource     ../../lib/state_manager.robot | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 23 | Variables    ../data/resource_variables.py | 
|  | 24 |  | 
|  | 25 | *** Variables *** | 
| Sridevi Ramesh | fba7a39 | 2025-03-27 10:21:40 -0500 | [diff] [blame] | 26 | ${OPENBMC_GUI_URL}              https://${OPENBMC_HOST}:${HTTPS_PORT} | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 27 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 28 | ${obmc_PowerOff_state}       Off | 
|  | 29 | ${obmc_PowerRunning_state}   Running | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 30 | ${obmc_PowerStandby_state}   Standby | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 31 |  | 
| George Keishing | 4d4ef99 | 2021-01-28 09:56:53 -0600 | [diff] [blame] | 32 | # Default GUI browser and mode is set to "Firefox" and "headless" | 
| Rahul Maheshwari | dd38aef | 2018-11-15 23:33:10 -0600 | [diff] [blame] | 33 | # respectively here. | 
|  | 34 | ${GUI_BROWSER}               ff | 
|  | 35 | ${GUI_MODE}                  headless | 
|  | 36 |  | 
| manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 37 | ${CMD_INTERNAL_FAILURE}      busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/logging | 
|  | 38 | ...  xyz.openbmc_project.Logging.Create Create ssa{ss} xyz.openbmc_project.Common.Error.InternalFailure | 
|  | 39 | ...  xyz.openbmc_project.Logging.Entry.Level.Error 0 | 
|  | 40 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 41 | *** Keywords *** | 
|  | 42 | Launch OpenBMC GUI Browser | 
|  | 43 | [Documentation]  Launch the OpenBMC GUI URL on a browser. | 
|  | 44 | # By default uses headless mode, otherwise, the GUI browser. | 
|  | 45 |  | 
|  | 46 | ${op_system}=  Get Operating System | 
| rramyasr-in | 714ed72 | 2025-05-20 02:19:50 -0500 | [diff] [blame] | 47 | IF  '${op_system}' == 'windows' | 
|  | 48 | Launch Header Browser | 
|  | 49 | ELSE IF  '${op_system}' == 'Darwin' | 
|  | 50 | # Mac OS is currently having some issues with Firefox, so using Chrome. | 
|  | 51 | Launch Header Browser  chrome | 
|  | 52 | ELSE | 
|  | 53 | # Linux OS. | 
|  | 54 | Launch Headless Browser | 
|  | 55 | END | 
|  | 56 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 57 |  | 
|  | 58 | Get Operating System | 
|  | 59 | [Documentation]  Identify platform/OS. | 
|  | 60 |  | 
|  | 61 | ${curdir_lower_case}=  Convert To Lowercase  ${CURDIR} | 
|  | 62 | ${windows_platform}=  Run Keyword And Return Status | 
|  | 63 | ...  Should Contain  ${curdir_lower_case}  c:\ | 
| rramyasr-in | 714ed72 | 2025-05-20 02:19:50 -0500 | [diff] [blame] | 64 | IF  '${windows_platform}' == 'True' | 
|  | 65 | ${op_system}=  Set Variable  windows | 
|  | 66 | ELSE | 
|  | 67 | ${op_system}=  Run  uname | 
|  | 68 | END | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 69 | RETURN  ${op_system} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 70 |  | 
| rramyasr-in | 714ed72 | 2025-05-20 02:19:50 -0500 | [diff] [blame] | 71 |  | 
| Sivas SRR | a011348 | 2018-02-22 22:27:05 -0600 | [diff] [blame] | 72 | Launch Header Browser | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 73 | [Documentation]  Open the browser with the URL and | 
|  | 74 | ...              login on windows platform. | 
| Rahul Maheshwari | dd38aef | 2018-11-15 23:33:10 -0600 | [diff] [blame] | 75 | [Arguments]  ${browser_type}=${GUI_BROWSER} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 76 |  | 
| Sivas SRR | a011348 | 2018-02-22 22:27:05 -0600 | [diff] [blame] | 77 | # Description of argument(s): | 
|  | 78 | # browser_type  Type of browser (e.g. "firefox", "chrome", etc.). | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 79 |  | 
| Sridevi Ramesh | fba7a39 | 2025-03-27 10:21:40 -0500 | [diff] [blame] | 80 | ${BROWSER_ID}=  Open Browser  ${OPENBMC_GUI_URL}  ${browser_type} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 81 | Maximize Browser Window | 
|  | 82 | Set Global Variable  ${BROWSER_ID} | 
|  | 83 |  | 
|  | 84 | Launch Headless Browser | 
|  | 85 | [Documentation]  Launch headless browser. | 
| Sridevi Ramesh | fba7a39 | 2025-03-27 10:21:40 -0500 | [diff] [blame] | 86 | [Arguments]  ${URL}=${OPENBMC_GUI_URL}  ${browser}=${GUI_BROWSER} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 87 |  | 
| Rahul Maheshwari | 79e276c | 2018-06-11 01:23:15 -0500 | [diff] [blame] | 88 | # Description of argument(s): | 
|  | 89 | # URL      Openbmc GUI URL to be open | 
|  | 90 | #          (e.g. https://openbmc-test.mybluemix.net/#/login). | 
|  | 91 | # browser  Browser to open given URL in headless way | 
|  | 92 | #          (e.g. gc for google chrome, ff for firefox). | 
|  | 93 |  | 
|  | 94 | Start Virtual Display | 
|  | 95 | ${browser_ID}=  Open Browser  ${URL} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 96 | Set Window Size  1920  1080 | 
|  | 97 |  | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 98 | RETURN  ${browser_ID} | 
| Rahul Maheshwari | 79e276c | 2018-06-11 01:23:15 -0500 | [diff] [blame] | 99 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 100 | Login OpenBMC GUI | 
|  | 101 | [Documentation]  Perform login to open BMC GUI. | 
|  | 102 | [Arguments]  ${username}=${OPENBMC_USERNAME} | 
|  | 103 | ...  ${password}=${OPENBMC_PASSWORD} | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 104 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 105 | # Description of argument(s): | 
|  | 106 | # username      The username. | 
|  | 107 | # password      The password. | 
|  | 108 |  | 
| Sridevi Ramesh | fba7a39 | 2025-03-27 10:21:40 -0500 | [diff] [blame] | 109 | Go To  ${OPENBMC_GUI_URL} | 
| Sivas SRR | a692535 | 2018-02-19 08:59:03 -0600 | [diff] [blame] | 110 | Wait Until Element Is Enabled  ${xpath_textbox_hostname} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 111 | Input Text  ${xpath_textbox_hostname}  ${OPENBMC_HOST} | 
|  | 112 | Input Text  ${xpath_textbox_username}  ${username} | 
|  | 113 | Input Password  ${xpath_textbox_password}  ${password} | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 114 | Click Element  login__submit | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 115 | Wait Until Element Is Enabled  ${xpath_button_logout} | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 116 | Page Should Contain  Server information | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 117 |  | 
|  | 118 |  | 
|  | 119 | Test Setup Execution | 
|  | 120 | [Documentation]  Verify all the preconditions to be tested. | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 121 | [Arguments]  ${obmc_test_setup_state}=${OBMC_PowerOff_state} | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 122 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 123 | # Description of argument(s): | 
|  | 124 | # obmc_test_setup      The OpenBMC required state. | 
|  | 125 |  | 
| Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 126 | Print Timen  ${TEST NAME} ==> [STARTED] | 
| Rahul Maheshwari | 7872f05 | 2018-06-19 01:12:34 -0500 | [diff] [blame] | 127 | Launch Browser And Login OpenBMC GUI | 
| George Keishing | 9bfdf8a | 2024-04-19 11:09:07 +0530 | [diff] [blame] | 128 | Log To Console  Verifying the system state and stability. | 
| Rahul Maheshwari | 8b5b5a4 | 2018-11-30 01:41:35 -0600 | [diff] [blame] | 129 |  | 
| Anusha Dathatri | f7a407c | 2019-07-22 00:59:38 -0500 | [diff] [blame] | 130 | Click Element  ${xpath_select_server_power} | 
| Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 131 | Wait Until Page Does Not Contain  Unreachable | 
| Rahul Maheshwari | 8b5b5a4 | 2018-11-30 01:41:35 -0600 | [diff] [blame] | 132 | ${obmc_current_state}=  Get Text  ${xpath_power_indicator} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 133 | Rpvars  obmc_current_state | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 134 |  | 
|  | 135 | ${obmc_state_status}=  Run Keyword And Return Status | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 136 | ...  Should Contain  ${obmc_current_state}  ${obmc_test_setup_state} | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 137 | Return From Keyword If  '${obmc_state_status}' == 'True' | 
|  | 138 |  | 
|  | 139 | ${obmc_standby_state}=  Run Keyword And Return Status | 
|  | 140 | ...  Should Contain  ${obmc_current_state}  ${obmc_standby_state} | 
|  | 141 |  | 
| rramyasr-in | 714ed72 | 2025-05-20 02:19:50 -0500 | [diff] [blame] | 142 | IF  '${obmc_standby_state}' == 'True' | 
|  | 143 | Reboot OpenBMC | 
|  | 144 | END | 
|  | 145 | IF  '${obmc_test_setup_state}' == '${obmc_PowerRunning_state}' | 
|  | 146 | Run Keywords  Power On OpenBMC  AND | 
|  | 147 | Wait Until Keyword Succeeds  10 min  60 sec  Is Host Running | 
|  | 148 | END | 
|  | 149 | IF  '${obmc_test_setup_state}' == '${obmc_PowerOff_state}' | 
|  | 150 | Redfish.Login | 
|  | 151 | Redfish Power Off | 
|  | 152 | Redfish.Logout | 
|  | 153 | END | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 154 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 155 |  | 
|  | 156 | Power On OpenBMC | 
|  | 157 | [Documentation]  Power on the OBMC system. | 
|  | 158 |  | 
|  | 159 | Log To Console  Power On OpenBMC... | 
| Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 160 | Click Element  ${xpath_select_server_power} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 161 | Click Button  ${xpath_select_button_power_on } | 
|  | 162 | Wait OpenBMC To Become Stable  ${obmc_running_state} | 
|  | 163 |  | 
|  | 164 | Reboot OpenBMC | 
|  | 165 | [Documentation]  Rebooting the OBMC system. | 
|  | 166 |  | 
|  | 167 | Log To Console  Reboting the OpenBMC... | 
| Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 168 | Click Element  ${xpath_select_server_power} | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 169 | Click Button  ${xpath_select_button_orderly_shutdown} | 
|  | 170 | Click Yes Button  ${xpath_select_button_orderly_shutdown_yes} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 171 | Wait OpenBMC To Become Stable  ${obmc_off_state} | 
|  | 172 |  | 
|  | 173 | Wait OpenBMC To Become Stable | 
|  | 174 | [Documentation]  Power off the OBMC. | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 175 | [Arguments]  ${obmc_expected_state}  ${retry_time}=15 min | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 176 | ...  ${retry_interval}=45 sec | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 177 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 178 | # Description of argument(s): | 
|  | 179 | # OBMC_expected_state      The OBMC state which is required for test. | 
|  | 180 | # retry_time               Total wait time after executing the command. | 
|  | 181 | # retry_interval           Time interval for to keep checking with in the | 
|  | 182 | #                          above total wait time. | 
|  | 183 |  | 
|  | 184 | Wait Until Keyword Succeeds  ${retry_time}  ${retry_interval} | 
| Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 185 | ...  Wait Until Element Contains  ${xpath_select_server_power} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 186 | ...  ${obmc_expected_state} | 
|  | 187 | Wait Until Keyword Succeeds  ${retry_time}  ${retry_interval} | 
|  | 188 | ...  Verify OpenBMC State From REST Interface  ${obmc_expected_state} | 
|  | 189 |  | 
|  | 190 | Verify OpenBMC State From REST Interface | 
|  | 191 | [Documentation]  Verify system state from REST Interface. | 
|  | 192 | [Arguments]  ${obmc_required_state} | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 193 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 194 | # Description of argument(s): | 
|  | 195 | # obmc_required_state      The OBMC state which is required for test. | 
|  | 196 |  | 
|  | 197 | ${obmc_current_state_REST}=  Get Host State | 
|  | 198 | Should Be Equal  ${obmc_current_state_REST}  ${obmc_required_state} | 
|  | 199 |  | 
|  | 200 | Click Yes Button | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 201 | [Documentation]  Click the 'Yes' button. | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 202 | [Arguments]  ${xpath_button_yes} | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 203 |  | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 204 | # Description of argument(s): | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 205 | # xpath_button_yes      The xpath of 'Yes' button. | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 206 |  | 
|  | 207 | Click Button  ${xpath_button_yes} | 
|  | 208 |  | 
|  | 209 | LogOut OpenBMC GUI | 
|  | 210 | [Documentation]  Log out of OpenBMC GUI. | 
|  | 211 | SSHLibrary.Close All Connections | 
| Rahul Maheshwari | 31b3c43 | 2020-06-26 05:24:13 -0500 | [diff] [blame] | 212 | Click Button  ${xpath_button_user_action} | 
| Rahul Maheshwari | d36b6ac | 2018-06-19 01:44:06 -0500 | [diff] [blame] | 213 | Click Element  ${xpath_button_logout} | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 214 | Wait Until Page Contains Element  ${xpath_button_login} | 
|  | 215 |  | 
|  | 216 | Test Teardown Execution | 
|  | 217 | [Documentation]  Do final closure activities of test case execution. | 
| Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 218 | Print Pgm Footer | 
| Sathyajith M S | 4f26ae7 | 2018-01-16 04:45:05 -0600 | [diff] [blame] | 219 | Print Dashes  0  100  1  = | 
| Rahul Maheshwari | cfdec85 | 2018-11-30 03:44:49 -0600 | [diff] [blame] | 220 | Close Browser | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 221 |  | 
| Rahul Maheshwari | 1b5369b | 2018-06-11 00:57:03 -0500 | [diff] [blame] | 222 |  | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 223 | Open Browser With URL | 
|  | 224 | [Documentation]  Open browser with specified URL and returns browser id. | 
| Rahul Maheshwari | dd38aef | 2018-11-15 23:33:10 -0600 | [diff] [blame] | 225 | [Arguments]  ${URL}  ${browser}=ff  ${mode}=${GUI_MODE} | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 226 |  | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 227 | # Description of argument(s): | 
|  | 228 | # URL      Openbmc GUI URL to be open | 
| Rahul Maheshwari | 79e276c | 2018-06-11 01:23:15 -0500 | [diff] [blame] | 229 | #          (e.g. https://openbmc-test.mybluemix.net/#/login). | 
|  | 230 | # browser  Browser used to open above URL | 
|  | 231 | #          (e.g. gc for google chrome, ff for firefox). | 
|  | 232 | # mode     Browser opening mode(e.g. headless, header). | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 233 |  | 
| rramyasr-in | 714ed72 | 2025-05-20 02:19:50 -0500 | [diff] [blame] | 234 | IF  '${mode}' == 'headless' | 
|  | 235 | ${browser_ID}=  Launch Headless Browser  ${URL}  ${browser} | 
|  | 236 | ELSE | 
|  | 237 | ${browser_ID}=  Open Browser  ${URL}  ${browser} | 
|  | 238 | END | 
| George Keishing | 409df05 | 2024-01-17 22:36:14 +0530 | [diff] [blame] | 239 | RETURN  ${browser_ID} | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 240 |  | 
| Rahul Maheshwari | 1b5369b | 2018-06-11 00:57:03 -0500 | [diff] [blame] | 241 |  | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 242 | Controller Server Power Click Button | 
|  | 243 | [Documentation]  Click main server power in the header section. | 
|  | 244 | [Arguments]  ${controller_element} | 
| Sathyajith M S | 2cdab0a | 2018-02-13 19:36:28 -0600 | [diff] [blame] | 245 |  | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 246 | # Description of argument(s): | 
|  | 247 | # controller_element  Server power controller element | 
|  | 248 | #                     (e.g. power__power-on.) | 
|  | 249 |  | 
| Rahul Maheshwari | dbbf179 | 2018-10-31 05:36:29 -0500 | [diff] [blame] | 250 | Click Element  ${xpath_select_server_power} | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 251 | Wait Until Element Is Visible  ${controller_element} | 
|  | 252 | Page Should Contain Button  ${controller_element} | 
|  | 253 | Click Element  ${controller_element} | 
|  | 254 |  | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 255 |  | 
|  | 256 | GUI Power On | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 257 | [Documentation]  Power on the host using GUI. | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 258 |  | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 259 | Controller Server Power Click Button  power__power-on | 
| Anusha Dathatri | 7ea44c1 | 2019-09-04 09:28:38 -0500 | [diff] [blame] | 260 | Wait Until Page Contains  Running   timeout=30s | 
| Sivas SRR | ffa4269 | 2018-01-17 05:17:35 -0600 | [diff] [blame] | 261 |  | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 262 | Verify Display Content | 
|  | 263 | [Documentation]  Verify text content display. | 
|  | 264 | [Arguments]  ${display_text} | 
|  | 265 |  | 
|  | 266 | # Description of argument(s): | 
|  | 267 | # display_text   The text which is expected to be found on the web page. | 
|  | 268 |  | 
|  | 269 | Page Should Contain  ${display_text} | 
|  | 270 |  | 
| Sathyajith M S | f52d6fc | 2018-01-24 10:11:18 -0600 | [diff] [blame] | 271 |  | 
|  | 272 | Verify Warning Message Display Text | 
|  | 273 | [Documentation]  Verify the warning message display text. | 
|  | 274 | [Arguments]  ${xpath_text_message}  ${text_message} | 
|  | 275 |  | 
|  | 276 | # xpath_text_message  Xpath of warning message display. | 
|  | 277 | # text_message        Content of the display message info. | 
|  | 278 |  | 
| Anusha Dathatri | f93a5c4 | 2019-07-24 05:29:44 -0500 | [diff] [blame] | 279 | Element Should Contain  ${xpath_text_message}  ${text_message} | 
| Sivas SRR | ca534e6 | 2018-02-20 02:22:02 -0600 | [diff] [blame] | 280 |  | 
|  | 281 |  | 
|  | 282 | Expected Initial Test State | 
|  | 283 | [Documentation]  Power on the host if "Running" expected, Power off the | 
|  | 284 | ...  host if "Off" expected as per the requirement of initial test state. | 
|  | 285 | [Arguments]  ${expectedState} | 
|  | 286 | # Description of argument(s): | 
|  | 287 | # expectedState    Test initial host state. | 
|  | 288 |  | 
| rramyasr-in | 714ed72 | 2025-05-20 02:19:50 -0500 | [diff] [blame] | 289 | IF  '${expectedState}' == 'Running' | 
|  | 290 | REST Power On  stack_mode=skip  quiet=1 | 
|  | 291 | END | 
| Sivas SRR | ca534e6 | 2018-02-20 02:22:02 -0600 | [diff] [blame] | 292 |  | 
| rramyasr-in | 714ed72 | 2025-05-20 02:19:50 -0500 | [diff] [blame] | 293 | IF  '${expectedState}' == 'Off' | 
|  | 294 | REST Power Off  stack_mode=skip  quiet=1 | 
|  | 295 | END | 
| Sivas SRR | 008dcc6 | 2018-02-27 06:34:56 -0600 | [diff] [blame] | 296 |  | 
|  | 297 | Launch Browser And Login OpenBMC GUI | 
|  | 298 | [Documentation]  Launch browser and log into openbmc GUI. | 
|  | 299 |  | 
| Sridevi Ramesh | fba7a39 | 2025-03-27 10:21:40 -0500 | [diff] [blame] | 300 | Open Browser With URL  ${OPENBMC_GUI_URL} | 
| Sivas SRR | 008dcc6 | 2018-02-27 06:34:56 -0600 | [diff] [blame] | 301 | Login OpenBMC GUI  ${OPENBMC_USERNAME}  ${OPENBMC_PASSWORD} | 
|  | 302 |  | 
|  | 303 | Logout And Close Browser | 
|  | 304 | [Documentation]  Logout from openbmc application and close the browser. | 
|  | 305 |  | 
| Rahul Maheshwari | 31b3c43 | 2020-06-26 05:24:13 -0500 | [diff] [blame] | 306 | Click Button  ${xpath_button_user_action} | 
|  | 307 | Click Button  ${xpath_button_logout} | 
| Sivas SRR | 008dcc6 | 2018-02-27 06:34:56 -0600 | [diff] [blame] | 308 | Close Browser | 
| Rahul Maheshwari | f3fa674 | 2020-05-18 06:24:04 -0500 | [diff] [blame] | 309 |  |