Micro Focus QTP (UFT) Forums
How to uniquely identify a checkbox - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to uniquely identify a checkbox (/Thread-How-to-uniquely-identify-a-checkbox)



How to uniquely identify a checkbox - vini - 07-04-2012

Hi

I am working on a windows form .Net application using QTP and there are a set of checkboxes which are repeated and all have the same property.I need to select the one particular checkbox from each set.If the checkbox is not visible on the screen then we need to scrool down else in pops a error message.Is there a way to select one particular checkbox from each set.

I tried the below code in a loop but its not selecting the checkbox in all the sets,it skips some sets

Code:
objchkbox ("index").Value=ind                                        
val=SwfWindow(objTemplate).SwfCheckBox(objchkbox).GetROProperty("hwnd"            
SwfWindow(objTemplate).SwfCheckBox(objchkbox).Set "on"             SwfWindow(objTemplate).SwfScrollBar("vScrollBar").NextLine (30)