Friday, October 20, 2017

Micro Focus UFT - SwfList - Print all items - select the required items

VEMbv  = "R NA"
VTIDbv = "R NA"


SwfWindow("ASHA").SwfWindow("NIC").Activate
'''''''Option 1

SwfWindow("ASHA").SwfWindow("NIC").SwfObject("Your EID").DblClick 151,15
SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").Select VEMbv

'''''' OR 'Option 2

Dim EmailStatusallitems
Dim EmailStatusvalue

SwfWindow("ASHA").SwfWindow("NIC").SwfObject("Your EID").DblClick 151,15
EmailStatusallitems = SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").GetROProperty("all items")

EmailStatusvalue = SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").getItem(0)
EmailStatusvalue1 = SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").getItem(1)
EmailStatusvalue2 = SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").getItem(2)
EmailStatusvalue3 = SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").getItem(3)

Msgbox EmailStatusvalue
Msgbox EmailStatusvalue1
Msgbox EmailStatusvalue2
Msgbox EmailStatusvalue3

'''''' OR 'Option 3

SwfWindow("ASHA").SwfWindow("NIC").SwfObject("Email Address").DblClick 151,15

EmailStatusItemsCount = SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").GetROProperty("items count")
msgbox EmailStatusItemsCount

For jList = 0 To EmailStatusItemsCount-1 

SwfWindow("ASHA").SwfWindow("NIC").SwfObject("Email Address").DblClick 151,15

'msgbox SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").getItem(jList)
SwfWindow("ASHA").SwfToolbar("SwfToolbar").SwfList("SwfList").Select (2)

Next


SwfWindow("ASHA").SwfWindow("NIC").SwfEdit("SwfEdit").Type  micTab

No comments:

Post a Comment