1. I have asked the same question for the third time, but
i am getting wrong answers.
Pls give me the script to count the number of edit boxes or
checkboxes in an windows application screen.
In windows application childobject is not working, anyone
very urgent

Answers were Sorted based on User's Feedback



1. I have asked the same question for the third time, but i am getting wrong answers. Pls give m..

Answer / hemakumar.m

i am using 9.5. for u i giving one more solution verify it.

Dim oDesc
Set oDesc=Description.Create()
oDesc("micclass").value="WinEdit"
iObjCount=0
For iIndex=0 To 100
If Dialog("regexpwndtitle:=Login").WinEdit
(oDesc,"index:="&iIndex).Exist(2) Then
iObjCount=iObjCount+1
Else
Exit For
End If
Next
msgbox iObjCount

iObjCount gives editboxes count. u can keep what ever value
u want for ending of for loop.But it must be greater than
equal value,then only u can get correct number.

Is This Answer Correct ?    2 Yes 0 No

1. I have asked the same question for the third time, but i am getting wrong answers. Pls give m..

Answer / raju

SystemUtil.CloseProcessByName "flight4a.exe"

SystemUtil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"

Set oDesc=Description.Create
oDesc("micClass").value="WinEdit"

Set oChildern=dialog("regexpwndtitle:=Login").ChildObjects
(oDesc)

msgbox ochildern.count

Is This Answer Correct ?    1 Yes 0 No

1. I have asked the same question for the third time, but i am getting wrong answers. Pls give m..

Answer / hemakumar.m

i am getting correct answer. childobjects is working for
windows apps.It is better to mention error description.

in ur coding u kept small c when getting the count as u
mentioned above.

Set oDesc=Description.Create
oDesc("micClass").value="WinEdit"

Set oChildern=dialog("regexpwndtitle:=Login").ChildObjects
(oDesc)

msgbox oChildern.count

Is This Answer Correct ?    1 Yes 0 No

1. I have asked the same question for the third time, but i am getting wrong answers. Pls give m..

Answer / dimple

Hi subhash

find the below simple code

Set objdes=Description.Create
objdes("micclass").value="WinEdit"
Set objchild=Window("text:=Flight Reservation").ChildObjects
(objdes)

c=objchild.count

msgbox c

Is This Answer Correct ?    1 Yes 0 No

1. I have asked the same question for the third time, but i am getting wrong answers. Pls give m..

Answer / nath t

which version are you using. if u are using 8.2 version the
above code is not executed. u can use above 8.2 version of
QTP.

Is This Answer Correct ?    0 Yes 0 No

1. I have asked the same question for the third time, but i am getting wrong answers. Pls give m..

Answer / amrita

even i am facing the same problem what was faced by subash

Is This Answer Correct ?    0 Yes 0 No

1. I have asked the same question for the third time, but i am getting wrong answers. Pls give m..

Answer / suganya

i am also not getting the count it is showing o as result.please help me

Is This Answer Correct ?    0 Yes 0 No

1. I have asked the same question for the third time, but i am getting wrong answers. Pls give m..

Answer / subaash patil

Thanks a lot Hema Kumar, Nath, and Raju

I just had missed using the word SET in the code.

It is now working fine

Subaash Patil

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

what are the different Frame Works in Quick Test Proffessional testing

3 Answers   Wipro,


You have a WebTable in Web application. When you Record a Scenario using QTP, WebTable didn't recognized and also Repository is not having Webtable information. In this case How to find RowCount and Coloumn Count?

2 Answers   PanTerra,


How are cgi programs, applets, javascripts, ActiveX components, etc. to be maintained, tracked, controlled, and tested?

0 Answers  


Think and Reply.. can we parameterize radio buttons, check boxes? as in flight web site on flight preference page, choosing different flight produces trouble if from port and to port been parameterize, and runs. Try it by own you will get the error.

3 Answers   Patni,


actually how many hours per one day we will work on automation (qtp) in real time

1 Answers   Synechron,






When there is descriptive programming, why do we go for Object repository for desigining scripts.?? why cant we use descriptive programming instead of using the Object repository..??

4 Answers   DST Global Solutions,


In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field will reflects and so on.if total psngrs=100 then will we capture all the fields for the psngrs to Automate the app how we can handle this scenerio thru Descriptive programming?

0 Answers  


what is the use of Text output value in Qtp?

2 Answers  


I have written some scripts in QTP by using older version, but I want to run them in latest version. Is there any process to do that.If so can anyone explain me?

1 Answers  


What are the Automation Limitations??

1 Answers  


I am a beginner plz tell me,how do we write scripts in QTP? In my opinion we can write scipts in expert view or there is another option where we can write scripts. plz tell me.

5 Answers  


How to export QTP results to an .xls file?

10 Answers   IBM,


Categories