Micro Focus QTP (UFT) Forums
for Check box solution - 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: for Check box solution (/Thread-for-Check-box-solution)



for Check box solution - samson - 02-04-2010

Hi all,

In my page there are several check boxes, so i'm running my test for 13 iterations. now, is there any possibility in checking(Randomly) the check boxes automatically.
If kindly, as soon as possible.
Thanking you,
Samson.B


RE: for Check box solution - sreekanth chilam - 02-04-2010

Hi,

Refer the below sample code & map it to your requirements.

Code:
Set chk_obj=Description.Create
chk_obj("micclass").Value="WebCheckBox"
    
Set x= Browser("xxxx").page("xxx").ChildObjects(chk_obj)
chk_count= x.count-1
Browser("xxx").page("xxx").WebCheckbox("ClassName:=WebCheckBox","index:="&RandomNumber(0,chk_count)).set "ON"



RE: for Check box solution - samson - 03-12-2010

Thank you,