Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame^] | 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 | |
| 14 | APPC LCM API HEALTHCHECK |
| 15 | [Documentation] APPC LCM API HEALTHCHECK |
| 16 | Start Virtual Display 1920 1080 |
| 17 | Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome |
| 18 | # Maximize Browser Window |
| 19 | # 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 |
| 20 | |
| 21 | Reload Page |
| 22 | |
| 23 | # Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] |
| 24 | |
| 25 | # Set Selenium Speed 60 |
| 26 | # Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] |
| 27 | |
| 28 | |
| 29 | # 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')] |
| 30 | # Set Selenium Speed 60 |
| 31 | # Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a |
| 32 | # Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a |
| 33 | |
| 34 | # Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE} |
| 35 | # ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE} |
| 36 | |
| 37 | # 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 |
| 38 | # Set Selenium Speed 90 |
| 39 | # Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content} |
| 40 | # 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} |
| 41 | |
| 42 | # 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] |
| 43 | # Set Selenium Speed 90 |
| 44 | # Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input |
| 45 | |
| 46 | ## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre |
| 47 | ## 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 |
| 48 | |
| 49 | Tear Down |
| 50 | |
| 51 | [Documentation] Close all browsers |
| 52 | Close All Browsers |