Sivas SRR | c244625 | 2017-04-12 11:46:15 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Library OperatingSystem |
| 4 | Library Selenium2Library 120 120 |
| 5 | Library Screenshot |
| 6 | |
| 7 | Resource resource.txt |
| 8 | |
| 9 | *** Keywords *** |
| 10 | |
| 11 | Open Browser With URL |
| 12 | [Documentation] Open browser with specified URL and returns browser id. |
| 13 | [Arguments] ${URL} ${browser}=gc |
| 14 | # Description of argument(s): |
| 15 | # URL Openbmc GUI URL to be open |
| 16 | # (e.g. https://openbmc-test.mybluemix.net/#/login ) |
| 17 | # browser browser used to open above URL |
| 18 | # (e.g. gc for google chrome, ff for firefox) |
| 19 | ${browser_ID}= Open Browser ${URL} ${browser} |
| 20 | [Return] browser_ID |
| 21 | |
| 22 | Model Server Power Click |
| 23 | [Documentation] Click main server power in the header section. |
| 24 | [Arguments] ${div_element} ${anchor_element} |
| 25 | # Description of argument(s): |
| 26 | # div_element Server power header divisional element |
| 27 | # (e.g. header_wrapper) |
| 28 | # anchor_element Server power header anchor element |
| 29 | # (e.g. header_wrapper_elt) |
| 30 | Wait Until Element Is Visible |
| 31 | ... //*[@id='header__wrapper']/div/div[${div_element}]/a[${anchor_element}]/span |
| 32 | Click Element |
| 33 | ... //*[@id='header__wrapper']/div/div[${div_element}]/a[${anchor_element}]/span |
| 34 | |
| 35 | Controller Server Power Click |
| 36 | [Documentation] Click main server power in the header section. |
| 37 | [Arguments] ${controller_element} |
| 38 | # Description of argument(s): |
| 39 | # controller_element Server power controller element |
| 40 | # (e.g. power__power-on) |
| 41 | |
| 42 | Wait Until Element Is Visible ${controller_element} |
| 43 | Click Element ${controller_element} |
| 44 | |
| 45 | Controller Power Operations Confirmation Click |
| 46 | [Documentation] Click Common Power Operations Confirmation. |
| 47 | [Arguments] ${main_element} ${sub_element} ${confirm_msg_elt} ${confirmation} |
| 48 | # Description of argument(s): |
| 49 | # main_element Server power operations element |
| 50 | # (e.g. power_operations) |
| 51 | # sub_element Server power operations sub element |
| 52 | # (e.g. warm_boot, shut_down) |
| 53 | # confirm_msg_elt Server power operations confirm message element |
| 54 | # (e.g. confirm_msg) |
| 55 | # confirmation Server power operations confirmation |
| 56 | # (e.g. yes) |
| 57 | |
| 58 | Click Element |
| 59 | ... //*[@id='power-operations']/div[${main_element}]/div[${sub_element}]/confirm/div/div[${confirm_msg_elt}]/button[${confirmation}] |
| 60 | |
| 61 | GUI Power On |
| 62 | [Documentation] Power on the CEC using GUI. |
| 63 | |
| 64 | Model Server Power Click ${header_wrapper} ${header_wrapper_elt} |
| 65 | Page Should Contain Attempts to power on the server |
| 66 | Controller Server Power Click power__power-on |
| 67 | |
| 68 | OpenBMC GUI Login |
| 69 | [Documentation] Log into OpenBMC GUI. |
| 70 | |
| 71 | Log ${obmc_BMC_URL} |
| 72 | Open Browser With URL ${obmc_BMC_URL} gc |
| 73 | Page Should Contain Button login__submit |
| 74 | Wait Until Page Contains Element ${obmc_uname} |
| 75 | Input Text ${obmc_uname} ${obmc_user_name} |
| 76 | Input Password password ${obmc_password} |
| 77 | Click Element login__submit |
| 78 | Page Should Contain System Overview |
| 79 | |