93c72d7254bcae775da9ced9bddfdc78e32c09d5
[integration/csit.git] / tests / appc / healthcheck / LCM_VNF_RESTART_TIMESTAMP.robot
1 *** Settings ***
2 Library    Selenium2Library
3 Library    OperatingSystem
4 Library     XvfbRobot
5 Resource   ${CURDIR}/APPC_GLOBAL_VARIABLES.robot
6 Resource   ${CURDIR}/gettime.robot
7
8
9
10 *** Variable ***
11 ${ResponseCode}
12 ${var}
13
14 *** Test Cases ***
15     
16 APPC LCM API VNF RESTART
17         [Documentation] APPC LCM API VNF RESTART 
18         Start Virtual Display     1920     1080
19         Open Browser    http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html    chrome
20 #       Maximize Browser Window
21 #       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
22         
23         Reload Page
24
25 #       Wait Until Page Contains Element    xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a  
26 #       Set Selenium Speed      60
27 #       Click Element     xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
28
29
30 #       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')]        
31 #       Set Selenium Speed      60
32 #       Click Element     xpath=.//*[contains(text(),'appc-provider-lcm:restart')]
33         
34 #       Get Server time    ${GLOBAL_VNF_RESTART_REQUESTFILE}
35 #       ${file_content}=    OperatingSystem.Get File    ${GLOBAL_VNF_RESTART_REQUESTFILE}
36     
37 #    Wait Until Page Contains Element    xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3]
38 #       Set Selenium Speed      90
39 #       Input Text         xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1]        ${file_content} 
40 #       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]
41
42 #       Input Text     xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3]      ${file_content}
43         
44 #       ${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       
45 #       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
46         
47          
48 Tear Down
49     [Documentation]   Close all browsers
50     Close All Browsers