diff options
-rw-r--r-- | robot/resources/global_properties.robot | 6 | ||||
-rw-r--r-- | robot/resources/openstack/heat_interface.robot | 2 | ||||
-rw-r--r-- | robot/resources/vid/create_service_instance.robot | 14 | ||||
-rw-r--r-- | robot/resources/vid/create_vid_vnf.robot | 65 | ||||
-rw-r--r-- | robot/resources/vid/teardown_vid.robot | 59 | ||||
-rw-r--r-- | robot/resources/vid/vid_interface.robot | 48 |
6 files changed, 99 insertions, 95 deletions
diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot index 819f56a4..442a69cf 100644 --- a/robot/resources/global_properties.robot +++ b/robot/resources/global_properties.robot @@ -18,5 +18,9 @@ ${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute ${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network ${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image ${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity +${GLOBAL_OPENSTACK_STACK_DEPLOYMENT_TIMEOUT} 600s ${GLOBAL_AAI_CLOUD_OWNER} Rackspace -${GLOBAL_BUILD_NUMBER} 0
\ No newline at end of file +${GLOBAL_BUILD_NUMBER} 0 +${GLOBAL_VID_UI_TIMEOUT_SHORT} 20s +${GLOBAL_VID_UI_TIMEOUT_MEDIUM} 60s +${GLOBAL_VID_UI_TIMEOUT_LONG} 120s diff --git a/robot/resources/openstack/heat_interface.robot b/robot/resources/openstack/heat_interface.robot index 32f3fdee..b23cb758 100644 --- a/robot/resources/openstack/heat_interface.robot +++ b/robot/resources/openstack/heat_interface.robot @@ -78,7 +78,7 @@ Get Stack Resources [Return] ${resp.json()} Wait for Stack to Be Deployed - [Arguments] ${alias} ${stack_name} ${timeout}=600s + [Arguments] ${alias} ${stack_name} ${timeout}=${GLOBAL_OPENSTACK_STACK_DEPLOYMENT_TIMEOUT} ${stack_info}= Wait Until Keyword Succeeds ${timeout} 30 sec Get Deployed Stack ${alias} ${stack_name} ${status}= Get From Dictionary ${stack_info} stack_status Should Be Equal ${status} CREATE_COMPLETE diff --git a/robot/resources/vid/create_service_instance.robot b/robot/resources/vid/create_service_instance.robot index 204b7d67..7cdafe0c 100644 --- a/robot/resources/vid/create_service_instance.robot +++ b/robot/resources/vid/create_service_instance.robot @@ -19,14 +19,14 @@ Create VID Service Instance Wait Until Keyword Succeeds 300s 1s Wait For Model ${service_model_type} Press Key xpath=//tr[td/span/text() = '${service_model_type}']/td/button[text() = 'Deploy' and not(@disabled)] \\13 ${uuid}= Generate UUID - Wait Until Page Contains Element xpath=//input[@parameter-name='Instance Name'] 120s - Wait Until Element Is Visible xpath=//input[@parameter-name='Instance Name'] 120s + Wait Until Page Contains Element xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} + Wait Until Element Is Visible xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} Xpath Should Match X Times //input[@parameter-name='Instance Name'] 1 Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name} Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name} Select From List WHen Enabled //select[@prompt='Select Service Type'] ${service_type} Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm'] - Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=120s + Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close'] ${request_id}= Parse Request Id ${response text} @@ -39,15 +39,15 @@ Wait For Model [Arguments] ${service_model_type} Click Element partial link=Browse SDC Service Page Should Contain Element xpath=//div/h1[text() = 'Browse SDC Service Models'] - Wait Until Page Contains Element xpath=//button[text() = 'Deploy'] 240s + Wait Until Page Contains Element xpath=//button[text() = 'Deploy'] ${GLOBAL_VID_UI_TIMEOUT_LONG} Input Text When Enabled //input[@ng-model='searchString'] ${service_model_type} - Wait Until Element Is Visible xpath=//tr[td/span/text() = '${service_model_type}']/td/button[contains(text(),'Deploy')] 10s + Wait Until Element Is Visible xpath=//tr[td/span/text() = '${service_model_type}']/td/button[contains(text(),'Deploy')] ${GLOBAL_VID_UI_TIMEOUT_SHORT} Delete Service Instance By GUI [Arguments] ${service_instance_id} ${customer_name} Click On Element When Visible xpath=//a/span[@class='glyphicon glyphicon-remove'] - Click On Button When Visible xpath=//div[@class='buttonRow']/button[@ngx-enabled='true'] - Wait Until Element Contains xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=120s + Click On Button When Enabled xpath=//div[@class='buttonRow']/button[@ngx-enabled='true'] + Wait Until Element Contains xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] ${request_id}= Parse Request Id ${response text} Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot index 7417772f..371ad708 100644 --- a/robot/resources/vid/create_vid_vnf.robot +++ b/robot/resources/vid/create_vid_vnf.robot @@ -17,24 +17,20 @@ Create VID VNF [Arguments] ${service_instance_id} ${service_instance_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} Go To VID HOME Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a - Wait Until Page Contains Please search by timeout=60s - #Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=60s - #Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=60s + Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException) Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} Click Button button=Submit - Wait Until Page Contains Element link=View/Edit timeout=60s + Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Click Element xpath=//a[contains(text(), 'View/Edit')] - Wait Until Page Contains View/Edit Service Instance timeout=60s - #Wait Until Page Contains Element xpath=//div[@class='statusLine aaiVisible'] timeout=120s - #Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiVisible'] timeout=60s + Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Click Element button=Add VNF # This is where firefox breaks. Th elink never becomes visible when run with the script. Click Element link=${vnf_type} - Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] 20s - Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] 20s + Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT} + Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT} ## Without this sleep, the input text below gets immediately wiped out. ## Wait Until Angular Ready just sleeps for its timeout value @@ -44,12 +40,12 @@ Create VID VNF Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant} Click Element button=Confirm - Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Status: OK (200) timeout=120 + Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Status: OK (200) timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Should Not Contain ${response text} FAILED Click Element button=Close ${instance_id}= Parse Instance Id ${response text} - Wait Until Page Contains ${service_instance_name} 60s + Wait Until Page Contains ${service_instance_name} ${GLOBAL_VID_UI_TIMEOUT_MEDIUM} [Return] ${instance_id} Delete VID VNF @@ -57,21 +53,21 @@ Delete VID VNF Go To VID HOME Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a Wait Until Page Contains Please search by timeout=60s - Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=60s - Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=60s + Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException) Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} Click Button button=Submit - Wait Until Page Contains Element link=View/Edit timeout=60s + Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Click Element link=View/Edit - Wait Until Page Contains View/Edit Service Instance timeout=60s - Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=120s - Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=60s + Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} + Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} - Click On Element When Visible xpath=//li/div[contains(.,'${vnf_instance_id}')]/a/span[@class='glyphicon glyphicon-remove'] timeout=120s + Click On Element When Visible xpath=//li/div[contains(.,'${vnf_instance_id}')]/a/span[@class='glyphicon glyphicon-remove'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant} Click Element xpath=//div[@class='buttonRow']/button[@ngx-enabled='true'] @@ -85,24 +81,25 @@ Create VID VNF module [Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} Go To VID HOME Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a - Wait Until Page Contains Please search by timeout=60s - Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=60s + Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException) Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} Click Button button=Submit - Wait Until Page Contains Element link=View/Edit timeout=60s + Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Click Element link=View/Edit - Wait Until Page Contains View/Edit Service Instance timeout=60s - Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=120s - Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=120s - Wait Until Element Is Visible button=Add VF-Module timeout=120s + Wait Until Keyword Succeeds 300s 5s Wait For Add VF Module + #Wait Until Page Contains View/Edit Service Instance timeout=60s + #Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=120s + #Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=120s + #Wait Until Element Is Visible button=Add VF-Module timeout=120s Click Element button=Add VF-Module # This is where firefox breaks. Th elink never becomes visible when run with the script. Click Element link=${vnf_type} - Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] 20s - Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] 20s + Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT} + Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT} ## Without this sleep, the input text below gets immediately wiped out. ## Wait Until Angular Ready just sleeps for its timeout value @@ -111,7 +108,7 @@ Create VID VNF module Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant} Click Element button=Confirm - Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=120 + Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Click Element button=Close ${instance_id}= Parse Instance Id ${response text} @@ -119,4 +116,14 @@ Create VID VNF module ${request_id}= Parse Request Id ${response text} Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE - [Return] ${instance_id}
\ No newline at end of file + [Return] ${instance_id} + +Wait For Add VF Module + [Documentation] Retry by refresh if the ADD VF-Module is not visible + Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + ${status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible button=Add VF-Module timeout=${GLOBAL_VID_UI_TIMEOUT_SHORT} + Return From Keyword If '${status}' == 'PASS' + Reload Page + Fail Retry diff --git a/robot/resources/vid/teardown_vid.robot b/robot/resources/vid/teardown_vid.robot index 88408546..b57cd1d4 100644 --- a/robot/resources/vid/teardown_vid.robot +++ b/robot/resources/vid/teardown_vid.robot @@ -4,7 +4,7 @@ Library ExtendedSelenium2Library Library Collections Library String Library StringTemplater -Library UUID +Library UUID Resource vid_interface.robot Resource create_vid_vnf.robot Resource create_service_instance.robot @@ -14,21 +14,21 @@ ${VID_ENV} /vid ${VID_SERVICE_MODELS_SEARCH_CUST} ${GLOBAL_VID_SERVER}${VID_ENV}/serviceModels.htm#/instances/subdetails?selectedSubscriber=\${customer_id} ${VID_SERVICE_MODELS_SEARCH_URL} ${GLOBAL_VID_SERVER}${VID_ENV}/serviceModels.htm#/instances/services *** Keywords *** - -Teardown VID + +Teardown VID [Documentation] Teardown the VID This assumes that the any runnign stacks have been torn down - [Arguments] ${service_instance_id} ${lcp_region} ${tenant} - Return From Keyword If len('${service_instance_id}') == 0 + [Arguments] ${service_instance_id} ${lcp_region} ${tenant} + Return From Keyword If len('${service_instance_id}') == 0 # Keep going to the VID service instance until we get the pop-up alert that there is no service instance Wait Until Keyword Succeeds 300s 1s Delete VID ${service_instance_id} ${lcp_region} ${tenant} - -Delete VID + +Delete VID [Documentation] Teardown the next VID entity that has a Remove icon. [Arguments] ${service_instance_id} ${lcp_region} ${tenant} - # For vLB closed loop, we may have 2 vf modules and the vDNS one needs to be removed first. + # For vLB closed loop, we may have 2 vf modules and the vDNS one needs to be removed first. ${remove_order}= Create List vDNS_Ete Vfmodule_Ete - + # FAIL status is returned in ${vfmodule} because FAIL are ignored during teardown ${status} ${vfmodule}= Run Keyword and Ignore Error Delete Next VID Entity ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} Return From Keyword If '${status}' == 'FAIL' @@ -37,41 +37,41 @@ Delete VID Run Keyword If 'Vfmodule_Ete' in '${vfmodule}' Execute Reverse Heatbridge Fail Continue with Next Remove -Delete Next VID Entity +Delete Next VID Entity [Documentation] Teardown the next VID entity that has a Remove icon. - [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} + [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} ${vfmodule}= Catenate Go To ${VID_SERVICE_MODELS_SEARCH_URL} - Wait Until Page Contains Please search by timeout=60s - Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=60s - Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=60s - - # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException) + Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + + # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException) Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} # When Handle alert detects a pop-up. it will return FAIL and we are done # Return from Keyword is required because FAIL is inored during teardown ${status} ${value} Run Keyword And Ignore Error Handle Alert Return From Keyword If '${status}' == 'FAIL' ${status} - ${status} ${value} Run Keyword And Ignore Error Wait Until Page Contains Element link=View/Edit timeout=60s + ${status} ${value} Run Keyword And Ignore Error Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Return From Keyword If '${status}' == 'FAIL' ${status} - Click Element link=View/Edit - Wait Until Page Contains View/Edit Service Instance timeout=60s - Wait Until Element Is Visible xpath=//a/span[@class='glyphicon glyphicon-remove'] timeout=120s - - :for ${remove_first} in @{remove_order} + Click Element link=View/Edit + Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} + Wait Until Element Is Visible xpath=//a/span[@class='glyphicon glyphicon-remove'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} + + :for ${remove_first} in @{remove_order} \ ${remove_xpath}= Set Variable //li/div[contains(.,'${remove_first}')]/a/span[@class='glyphicon glyphicon-remove'] \ ${status} ${data}= Run Keyword And Ignore Error Page Should Contain Element xpath=${remove_xpath} - \ Exit For Loop If '${status}' == 'PASS' + \ Exit For Loop If '${status}' == 'PASS' \ ${remove_xpath}= Set Variable //li/div/a/span[@class='glyphicon glyphicon-remove'] - Click On Element When Visible xpath=${remove_xpath} + Click On Element When Visible xpath=${remove_xpath} ${status} ${value}= Run Keyword and Ignore Error Wait Until Page Contains Element xpath=//select[@parameter-id='lcpRegion'] - Run Keyword If '${status}'=='PASS' Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} + Run Keyword If '${status}'=='PASS' Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} Run Keyword If '${status}'=='PASS' Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant} - ${status} ${vfmodule}= Run Keyword And Ignore Error Get Text xpath=//td[contains(text(), 'Vf Module Name')]/../td[2] + ${status} ${vfmodule}= Run Keyword And Ignore Error Get Text xpath=//td[contains(text(), 'Vf Module Name')]/../td[2] Click Element xpath=//div[@class='buttonRow']/button[@ngx-enabled='true'] #//*[@id="mContent"]/div/div/div/div/table/tbody/tr/td/div/div[2]/div/div[1]/div[5]/button[1] Wait Until Page Contains 100 % 300s @@ -80,12 +80,11 @@ Delete Next VID Entity Click Element xpath=//div[@class='ng-scope']/div[@class = 'buttonRow']/button[text() = 'Close'] Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE [Return] ${vfmodule} - + Handle Alert [Documentation] When service instance has been deleted, an alert will be triggered on the search to end the loop ... The various Alert keywords did not prevent the alert exception on the Click ELement, hence this roundabout way of handling the alert - Run Keyword And Ignore Error Click Element button=Submit + Run Keyword And Ignore Error Click Element button=Submit ${status} ${t}= Run Keyword And Ignore Error Get Alert Message - Return From Keyword If '${status}' == 'FAIL' + Return From Keyword If '${status}' == 'FAIL' Fail ${t} -
\ No newline at end of file diff --git a/robot/resources/vid/vid_interface.robot b/robot/resources/vid/vid_interface.robot index 78b81484..1a450711 100644 --- a/robot/resources/vid/vid_interface.robot +++ b/robot/resources/vid/vid_interface.robot @@ -4,7 +4,7 @@ Library ExtendedSelenium2Library Library Collections Library String Library RequestsLibrary -Library UUID +Library UUID Resource ../global_properties.robot Resource ../browser_setup.robot @@ -31,8 +31,8 @@ Run VID Get Request ${headers}= Create Dictionary username=${GLOBAL_VID_HEALTH_USERNAME} password=${GLOBAL_VID_HEALTH_PASSWORD} Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} ${resp}= Get Request vid ${data_path} headers=${headers} Log Received response from vid ${resp.text} - [Return] ${resp} - + [Return] ${resp} + Login To VID GUI [Documentation] Logs in to VID GUI # Setup Browser Now being managed by test case @@ -47,55 +47,49 @@ Login To VID GUI Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_VID_USERNAME} Input Password xpath=//input[@ng-model='password'] ${GLOBAL_VID_PASSWORD} Click Button xpath=//input[@id='loginBtn'] - Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} Log Logged in to ${GLOBAL_VID_SERVER}${VID_ENV} Go To VID HOME [Documentation] Naviage to VID Home Go To ${VID_HOME_URL} - Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} - + Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click On Button When Enabled - [Arguments] ${xpath} ${timeout}=60s + [Arguments] ${xpath} ${timeout}=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Wait Until Page Contains Element xpath=${xpath} ${timeout} Wait Until Element Is Enabled xpath=${xpath} ${timeout} Click Button xpath=${xpath} -Click On Button When Visible - [Arguments] ${xpath} ${timeout}=60s - Wait Until Page Contains Element xpath=${xpath} ${timeout} - Wait Until Element Is Visible xpath=${xpath} ${timeout} - Click Button xpath=${xpath} - Click On Element When Visible - [Arguments] ${xpath} ${timeout}=60s + [Arguments] ${xpath} ${timeout}=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Wait Until Page Contains Element xpath=${xpath} ${timeout} Wait Until Element Is Visible xpath=${xpath} ${timeout} Click Element xpath=${xpath} - + Select From List When Enabled - [Arguments] ${xpath} ${value} ${timeout}=60s + [Arguments] ${xpath} ${value} ${timeout}=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Wait Until Page Contains Element xpath=${xpath} ${timeout} Wait Until Element Is Enabled xpath=${xpath} ${timeout} - Select From List xpath=${xpath} ${value} - -Input Text When Enabled - [Arguments] ${xpath} ${value} ${timeout}=60s + Select From List xpath=${xpath} ${value} + +Input Text When Enabled + [Arguments] ${xpath} ${value} ${timeout}=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Wait Until Page Contains Element xpath=${xpath} ${timeout} Wait Until Element Is Enabled xpath=${xpath} ${timeout} Input Text xpath=${xpath} ${value} - + Parse Request Id - [Arguments] ${mso_response_text} + [Arguments] ${mso_response_text} ${request_list}= Split String ${mso_response_text} 202)\n 1 - ${clean_string}= Replace String ${request_list[1]} \n ${empty} - ${json}= To Json ${clean_string} + ${clean_string}= Replace String ${request_list[1]} \n ${empty} + ${json}= To Json ${clean_string} ${request_id}= Catenate ${json['requestReferences']['requestId']} [Return] ${request_id} - + Parse Instance Id - [Arguments] ${mso_response_text} + [Arguments] ${mso_response_text} ${request_list}= Split String ${mso_response_text} 202)\n 1 - ${json}= To Json ${request_list[1]} + ${json}= To Json ${request_list[1]} ${request_id}= Catenate ${json['requestReferences']['instanceId']} [Return] ${request_id}
\ No newline at end of file |