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 could go wrong with test automation?

0 Answers  


i ve an excel in a QC folder. Thru my QTP script i want to open that excel in runtime. I am running this script from QC itself

4 Answers   TCS,


How many ways we can parameterize data in quicktest professional (qtp)?

0 Answers  


1.what is the extension of action template? 2.what are the strengths and weaknesses of Keyword driven framework? 3.how qtp identify runtime objects?

1 Answers   Satyam,


I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.

0 Answers   Adea Solutions,






Ehat is the descriptive programing in QTP?

4 Answers  


I have 5 no.of Action in my Test. Out off which i should make 3rd action as my start-up action. How should i make it?

5 Answers  


Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?

1 Answers   Crea,


1. how can you handle exceptions without using recovery scenario?

5 Answers   TCS,


how can i pass parameters into function?

4 Answers   Livetek,


What is the exact difference between QTP and RFT ?

2 Answers   CTS,


I have to pass all the test cases into gmail userid and password using functions please give me code thanks have anice and greate day

2 Answers  


Categories