Move CSIT to integration/csit repo
[integration/csit.git] / tests / appc / healthcheck / LCM_VM_RESTART_TIMESTAMP.robot
1 *** Settings ***
2 Library    Selenium2Library
3 Library    OperatingSystem
4 Library     XvfbRobot
5 Resource    APPC_GLOBAL_VARIABLES.robot
6 Resource    gettime.robot
7
8 *** Variable ***
9 ${ResponseCode}
10 ${var}
11
12 *** Test Cases ***
13 APPC LCM API VM RESTART
14         [Documentation] APPC LCM API VM RESTART 
15         Start Virtual Display     1920     1080
16         Open Browser    http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html    chrome
17 #       Maximize Browser Window
18 #       Click Element    xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img
19         
20         Reload Page
21
22 #       Wait Until Page Contains Element    xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a  
23 #       Set Selenium Speed      60
24 #       Click Element     xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
25
26 #       Wait Until Page Contains Element    xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]        
27 #       Set Selenium Speed      60
28 #       Click Element     xpath=.//*[contains(text(),'appc-provider-lcm:restart')]
29         
30 #   Get Server time    ${GLOBAL_VM_RESTART_REQUESTFILE}   
31    
32 #   ${file_content}=    OperatingSystem.Get File    ${GLOBAL_VM_RESTART_REQUESTFILE}
33     
34 #    Wait Until Page Contains Element    xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3]
35 #       Set Selenium Speed      90
36 #       Input Text         xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1]        ${file_content} 
37 #       Input Text     xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3]      ${file_content}
38
39 #       Click Element     xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1]
40         
41 #       ${var}=    Get Value    xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre
42 #       Element Text Should Be     xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200']     200     expected
43         
44          
45 Tear Down
46     [Documentation]   Close all browsers
47     Close All Browsers