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

Which company is better amdocs or techm ???

2 Answers  


how do you parameterize search button from the website? the page is a single winobject and i have made a virtual object button of search button but search box can't be converted into a winedit and if we try to convert it into winedit the value we enter in a searchbox appears as numbers in the script so we arent able to parameterize.help!!!

0 Answers   TCS,


Count the number of radio buttons and randomly select one.

1 Answers   Deloitte,


How to associate shared object repository to test in qtp?

0 Answers  


how to fetch the values from grid? & qtp recogniges that grid as a webelement? what u do?

0 Answers   IBM,






Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

0 Answers  


How u perform exception handling in QTp,what is other name for ths?

2 Answers  


What is the difference between client server application and web based application?

3 Answers   IBM,


How many ways return more then one value from function?

2 Answers   Ingram Micro,


How can I map test requirement to Test Set (multiple test cases)? Under test lab, I have multiple test cases. I would like to map 1 requirement to all test cases under that test set (in test lab)? Currently, I think QC only allow mapping 1 test requirement to 1 test case. Instead I would like to map 1 test requirement to multiple test cases under one test lab.

4 Answers   CarrizalSoft Technologies, DST Global Solutions,


Hi Friends, If you got one Bug , and you are insert that bug in bug tracking tool , and you need to attach SC's (screen shots) also. how to tae SC's , in your organization any separate tools available to take SC's. please provide Ans. its urgent... Thanx in advance

3 Answers  


Tell me the QTP Advantages and Disadvatages ?

6 Answers   Accenture, CTS, GE,


Categories