Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at once through descriptive programing in QTP using vb script.
Please send the answers...

Answers were Sorted based on User's Feedback



If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

Answer / ayushi saxena

set ocheck=description.create
ocheck("micclass").Value="WebCheckBox"
set checkcol=browser("micClass:=Browser").page("micClass:=Page").childobjects(ocheck)
for i=0 to checkcol.count -1
if i=9 OR i=10 OR i=13 then
checkcol(i).set "ON"
end if 
next 

Is This Answer Correct ?    8 Yes 0 No

If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

Answer / veeru

Below code saves sometime

set ocheck=description.create
ocheck("micclass").value="WebCheckbox"
set objCheckboxes = browser("Creationtime:=0").page("micclass:=page").childobjects(ocheck)
objCheckboxes(9).Set "ON"
objCheckboxes(10).Set "ON"
objCheckboxes(13).Set "ON"

Is This Answer Correct ?    2 Yes 0 No

If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

Answer / vamshi

browser("title:=.*").page("title:=.*").webcheckbox("name:=.*","index:=9").set "on"
browser("title:=.*").page("title:=.*").webcheckbox("name:=.*","index:=10").set "on"
browser("title:=.*").page("title:=.*").webcheckbox("name:=.*","index:=13").set "on"
because index value starts from zero

Is This Answer Correct ?    1 Yes 2 No

If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

Answer / ranga

set ocheck=description.create
ocheck("micclass")="webCheckbox"
set checkcol=browser().page().childobjects(ocheck)
for i=0 to checkcol.count -1
if i=9 and i=10 and i=13 then
checkcol(i).set "ON"
end if 
next 

Is This Answer Correct ?    3 Yes 8 No

If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

Answer / johnson

set ocheck=description.create
ocheck("micclass")="webedit"
set checkcol=browser().page().childobjects(ocheck)
for i=0 to checkcol.count -1
if i=10 and i=11 and i=14 then
checkcol(i).set "ON"
end if
next

Is This Answer Correct ?    1 Yes 16 No

Post New Answer

More QTP Interview Questions

Using Object Repository is a advantage or disadvantage?

6 Answers   Wipro,


How to add Dynamic Objects to Object repository?

5 Answers  


how can we retrieve ten rows from the data table using loop concept?

3 Answers  


h u call the function

6 Answers   Wipro,


wht is the difference between action and functio?

3 Answers  


Where you can store check point results?

3 Answers  


How to Analyze the Checpoint results with Standard Checpoint ?

1 Answers  


how to handle the textboxes where in it should take the sum like ex:: while posting a question in this site it will for what is the result of 6+3=__ where in we have to enter manually 9 and click on submit... but how to handle these cases in qtp.. can someone plz help me out wid dis...

1 Answers  


How many add-ins comes by default with qtp?

0 Answers  


After creating testcases, how do you start testing in QTP? what methodology will follow?

7 Answers   Actran, American Well,


Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks

0 Answers  


how to choose the framework in qtp ? 2)when we go for the descriptive programming ?

2 Answers   Syntel,


Categories