blob: ed85d4a1652bb365f4f87f25621889690fa5a71c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
*** Settings ***
Library Selenium2Library
Library XvfbRobot
Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot
Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot
*** Test Cases ***
APPC LCM API VNF RESTART
[Documentation] APPC LCM API VNF RESTART
[Teardown] Close All Browsers
# Set the timeout because Open Browser ended with timeout...
Set Selenium Timeout 5 seconds
Start Virtual Display 1920 1080
Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome
Set Window Size 1920 1080
# 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
Reload Page
# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a
# Set Selenium Speed 60
# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
# 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')]
# Set Selenium Speed 60
# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')]
# Get Server time ${GLOBAL_VNF_RESTART_REQUESTFILE}
# ${file_content}= OperatingSystem.Get File ${GLOBAL_VNF_RESTART_REQUESTFILE}
# Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3]
# Set Selenium Speed 90
# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content}
# 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]
# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content}
# ${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
# 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
|