In SWF List box items display with Check boxes. Once we selected those items automaticaly checkbox status change from ON to OFF or OFF to ON. In this case first, we can check status and if that is not exepected status then put required stauts.
Code :-
iChkboxcount=SwfWindow("WName").SwfWindow("EditorName").SwfList("ListBoxName").GetItemsCount
Reporter.ReportEvent micDone,"Captured Items count from list box", " ITems count :- " & iChkboxcount
For intItemNameIndex=0 to iChkboxcount-1
sItemname=SwfWindow("WindowName").SwfWindow("EditorName").SwfList("ListBoxname").GetItem(intItemNameIndex)
msgbox sItemname
Reporter.ReportEvent micDone," Selected ITem name","Item name: - " & sItemname
blnStatus=SwfWindow("WindowName").SwfWindow("EditorName").SwfList("ListBoxname").Object.GetItemCheckState(intItemNameIndex)
Reporter.ReportEvent micDone," Selected Item Checked Status"," Status " & blnStatus
Print sItemname&":"&blnStatus
If sItemname="Ecomm Configurator" and blnStatus=0 Then
REporter.ReportEvent micDone," Turned on REquired Check box"," Turned on required Check box"
SwfWindow("WindowName").SwfWindow("EditorName").SwfList("ListBoxname").Select "Give the required item name"
Exit for
End If
Next
Thursday, April 29, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment