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