blob: 8c75addce7b556ccbf9d90ac19240c9e53510868 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
2Library Selenium2Library
Gary Wu9abb61c2018-09-27 10:38:50 -07003Library XvfbRobot
Stanislav Chlebec050ef542018-10-03 08:45:16 +02004Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot
5Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot
Gary Wu9abb61c2018-09-27 10:38:50 -07006
Gary Wu9abb61c2018-09-27 10:38:50 -07007
8*** Test Cases ***
Gary Wu9abb61c2018-09-27 10:38:50 -07009APPC LCM API HEALTHCHECK
Stanislav Chlebec050ef542018-10-03 08:45:16 +020010 [Documentation] APPC LCM API HEALTHCHECK
11 [Teardown] Close All Browsers
12 Start Virtual Display 1920 1080
13 Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome
14 Set Window Size 1920 1080
15# 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
Gary Wu9abb61c2018-09-27 10:38:50 -070016
Stanislav Chlebec050ef542018-10-03 08:45:16 +020017 Reload Page
Gary Wu9abb61c2018-09-27 10:38:50 -070018
Stanislav Chlebec050ef542018-10-03 08:45:16 +020019# Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
Gary Wu9abb61c2018-09-27 10:38:50 -070020
Stanislav Chlebec050ef542018-10-03 08:45:16 +020021# Set Selenium Speed 60
22# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]
Gary Wu9abb61c2018-09-27 10:38:50 -070023
Stanislav Chlebec050ef542018-10-03 08:45:16 +020024# 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:health-check')]
25# Set Selenium Speed 60
26# Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a
27# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a
28
29# Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE}
30# ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE}
Gary Wu9abb61c2018-09-27 10:38:50 -070031
Stanislav Chlebec050ef542018-10-03 08:45:16 +020032# 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:health-check')]//following::table
33# Set Selenium Speed 90
34# Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content}
35# Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${file_content}
Gary Wu9abb61c2018-09-27 10:38:50 -070036
Stanislav Chlebec050ef542018-10-03 08:45:16 +020037# 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:health-check')]//following::form/div[2]/input[1]
38# Set Selenium Speed 90
39# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input
40
41## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre
42## Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre[1][text()='200'] 200 expected