blob: 25f088906657cea8bc5d702ac5c0da6858a2eba9 [file] [log] [blame]
Sivas SRRc2446252017-04-12 11:46:15 -05001*** Settings ***
2
3Library OperatingSystem
4Library Selenium2Library 120 120
5Library Screenshot
6
7Resource resource.txt
8
9*** Keywords ***
10
11Open 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
22Model 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
35Controller 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
45Controller 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
61GUI 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
68OpenBMC 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