09-26-2017, 12:43 PM
Hi, Good day to all, currently using UFT v14
I wanted to loop lines 1-13 using the data table which has 6 rows then after that run lines 14-16 once.
What statement would be best to use? currently it runs 6 times login to logout. Thanks in advance for your comments
I wanted to loop lines 1-13 using the data table which has 6 rows then after that run lines 14-16 once.
What statement would be best to use? currently it runs 6 times login to logout. Thanks in advance for your comments
Code:
1. Browser("VMware Service Manager").Page("VMware Service Manager").Link("Log a Call").Click
2. Browser("VMware Service Manager").Page("VMware Service Manager").Link("APAC").Click
3. Browser("VMware Service Manager").Page("VMware Service Manager").WebList("EXTFLDV_500064").Select DataTable.Value("EXTFLDV_500064", "Action1")
4. Browser("VMware Service Manager").Page("VMware Service Manager").WebEdit("Contact_No").Set DataTable.Value("Contact", "Action1")
5. Browser("VMware Service Manager").Page("VMware Service Manager").WebList("URGENCY_REF").Select DataTable.Value("URGENCY_REF", "Action1")
6. Browser("VMware Service Manager").Page("VMware Service Manager").WebList("IMPACT_REF").Select DataTable.Value("IMPACT_REF", "Action1")
7. Browser("VMware Service Manager").Page("VMware Service Manager").WebEdit("EXTFLDV_400136").Set DataTable.Value("EXTFLDV_400136", "Action1")
8. Browser("VMware Service Manager").Page("VMware Service Manager").WebEdit("HTMLTEXTAREA_PROBLEM_DESC").Set DataTable.Value("HTMLTEXTAREA_PROBLEM_DESC", "Action1")
9. Browser("VMware Service Manager").Page("VMware Service Manager").WebButton("Submit").Click
10. If Browser("VMware Service Manager").Page("VMware Service Manager").WebElement("innertext:=A new call has been logged with the following details:").Exist(4)Then
11. Browser("VMware Service Manager").Page("VMware Service Manager").Link("Log a Call").Click
12. End If
13. Wait(2)
14. Browser("VMware Service Manager").Page("VMware Service Manager").Link("Log Out").Click
15. Browser("VMware Service Manager").Page("VMware Service Manager").WebButton("OK").Click
16. Browser("VMware Service Manager").CloseAllTabs