Micro Focus QTP (UFT) Forums
Generate Run time error on Allchkboxes(i).GetROProperty("all items") - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Generate Run time error on Allchkboxes(i).GetROProperty("all items") (/Thread-Generate-Run-time-error-on-Allchkboxes-i-GetROProperty-all-items)



Generate Run time error on Allchkboxes(i).GetROProperty("all items") - Langxii - 06-02-2011

Hi,

I got run time error on line msgbox AllCHkBoxes(i).getROProperty("all items".
Would you please help ? This is the scrip to count number weblist on the app and output all items on every weblist.



Code:
Browser("....").Page("........").WebElement("......").Click
' create description object"
Set obj_ChkDesc = Description.Create( )
obj_ChkDesc("micclass").value = "WebList"
Set AllChkBoxes = Browser("....").Page("....").ChildObjects(obj_ChkDesc)
msgbox AllChkBoxes.count
For i=0  to AllChkBoxes.count -1
msgbox  AllChkBoxes(i).getROProperty("all items")
Next


Thanks,


RE: Generate Run time error on Allchkboxes(i).GetROProperty("all items") - rajpes - 07-06-2011

Your code looks just fine but i suspect your page to have more than one weblist, if this is the case, add one more property like
Code:
obj_ChkDesc("name").value = "name_of_WebList"