aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/appc/testsuite/LCM_VM_RESTART.robot
blob: 997ba17a03a140b52e1a2a5402a62b518391c5da (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
*** Settings ***
Library    Selenium2Library
Library    OperatingSystem

*** Variable ***
${ResponseCode}
${var}
${RequestJSON}    /LearningSamples/Resources/VMRestart.json


*** Test Cases ***
    
APPC API VM RESTART
  [Documentation] APPC VM LCM Restart 
  Open Browser    http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@104.130.138.49:8282/apidoc/explorer/index.html    chrome 
  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
  Click Element     xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a
  Click Element     xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23"]/div[1]/h3/span[2]/a
  ${VM_LCM_RESTART}     Get File    ${RequestJSON}
  Input Text     xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/form/table/tbody/tr/td[2]/textarea     ${VM_LCM_RESTART}
  Click Element     xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/form/div[2]/input
  # Get Text locator
  ${ResponseCode}    Get Text     xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre
  ${var}    Get Value    xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre
  Log     Value-->    ${ResponseCode}
  Log     var-->    ${var}
  Element Text Should Be     xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre     400     expected
  
Tear Down
    [Documentation]   Close all browsers
    Close All Browsers