aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-29 17:18:49 -0400
committerDR695H <dr695h@att.com>2019-07-29 17:18:49 -0400
commit63e3c4bfd4d38e02e355019bb0ce2d7410481c4b (patch)
treec81bf20779eff19bdfb5a975e14340282a3503f3 /robot/resources
parentc0cf6a4765212cc66e364fa0eb43a2447366ce5b (diff)
dont use outdated locator
Issue-ID: TEST-174 Change-Id: Iddff8eaec3300c3dc9485a18f46fe57296c8835c Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/vid/create_service_instance.robot2
-rw-r--r--robot/resources/vid/create_vid_vnf.robot25
-rw-r--r--robot/resources/vid/teardown_vid.robot5
3 files changed, 15 insertions, 17 deletions
diff --git a/robot/resources/vid/create_service_instance.robot b/robot/resources/vid/create_service_instance.robot
index e617d8fc..46a142b7 100644
--- a/robot/resources/vid/create_service_instance.robot
+++ b/robot/resources/vid/create_service_instance.robot
@@ -54,7 +54,7 @@ Wait For Model
Delete Service Instance By GUI
[Arguments] ${service_instance_id}
Click On Element When Visible xpath=//a/span[@class='glyphicon glyphicon-remove']
- Click On Button When Enabled xpath=//div[@class='buttonRow']/button[@ngx-enabled='true']
+ Click On Button When Enabled //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}
diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot
index 5ca55e48..76cf836b 100644
--- a/robot/resources/vid/create_vid_vnf.robot
+++ b/robot/resources/vid/create_vid_vnf.robot
@@ -21,13 +21,12 @@ Create VID VNF
#Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
#Select From List By Label //select[@ng-model='selectedserviceinstancetype'] Service Instance Id
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
- Click Button button=Submit
+ Click On Button When Enabled //button[contains(text(),'Submit')]
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=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
# in slower environment the background load of data from AAI takes time so that the button is not populated yet
- Sleep 20s
- Click Element button=Add node instance
+ Click On Button When Enabled //button[contains(text(),'Add node instance')]
#01681d02-2304-4c91-ab2d 0
# This is where firefox breaks. Th elink never becomes visible when run with the script.
${dataTestsId}= Catenate AddVNFOption-${vnf_type}
@@ -47,13 +46,13 @@ Create VID VNF
Sleep 5s
Click Element xpath=//multiselect[@parameter-id='lineOfBusiness']
Sleep 5s
- Click Element xpath=//button[contains(text(),${line_of_business})]
+ Click On Button When Enabled //button[contains(text(),${line_of_business})]
Select From List By Label xpath=//select[@parameter-id='platform'] ${platform}
- Click Element button=Confirm
+ Click On Button When Enabled //button[contains(text(),'Confirm')]
Wait Until Element Contains xpath=//pre[@class = 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
${response text}= Get Text xpath=//pre[@class = 'log ng-binding']
Should Not Contain ${response text} FAILED
- Click Element button=Close
+ Click On Button When Enabled //button[contains(text(),'Close')]
${instance_id}= Parse Instance Id ${response text}
Wait Until Page Contains ${service_instance_name} ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
[Return] ${instance_id}
@@ -68,7 +67,7 @@ Delete VID VNF
# 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
+ Click On Button When Enabled //button[contains(text(),'Submit')]
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=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
@@ -95,8 +94,7 @@ Create VID VNF module
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
- ###Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
- Click Button button=Submit
+ Click On Button When Enabled //button[contains(text(),'Submit')]
Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element link=View/Edit
Wait Until Keyword Succeeds 300s 5s Wait For Add VF Module
@@ -117,10 +115,10 @@ Create VID VNF module
Wait Until Element Is Visible xpath=//input[@parameter-id='sdncPreload'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
Wait Until Element Is Enabled xpath=//input[@parameter-id='sdncPreload'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
Select Checkbox xpath=//input[@parameter-id='sdncPreload']
- Click Element button=Confirm
+ Click On Button When Enabled //button[contains(text(),'Confirm')]
Wait Until Element Contains xpath=//pre[@class = 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
${response text}= Get Text xpath=//pre[@class = 'log ng-binding']
- Click Element button=Close
+ Click On Button When Enabled //button[contains(text(),'Close')]
${instance_id}= Parse Instance Id ${response text}
${request_id}= Parse Request Id ${response text}
@@ -130,8 +128,9 @@ Create VID VNF module
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}
- ${status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible button=Add VF-Module timeout=${GLOBAL_VID_UI_TIMEOUT_SHORT}
+ Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+
+ ${status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible //button[contains(text(),'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 46f5a33a..d5f7fb5a 100644
--- a/robot/resources/vid/teardown_vid.robot
+++ b/robot/resources/vid/teardown_vid.robot
@@ -50,8 +50,7 @@ Delete Next VID Entity
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
- Click Button button=Submit
-
+ Click On Button When Enabled //button[contains(text(),'Submit')]
# When Handle VID Alert detects a pop-up. it will return FAIL and we are done
# Return from Keyword is required because FAIL is inored during teardown
${teardown_status}= Catenate PASS
@@ -89,7 +88,7 @@ Delete Next VID Entity
Handle VID 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 On Button When Enabled //button[contains(text(),'Submit')]
${status} ${t}= Run Keyword And Ignore Error Handle Alert
Return From Keyword If '${status}' == 'FAIL'
Fail ${t}