How to get all the objects count and objects names in
webpage using QTP ?

Answers were Sorted based on User's Feedback



How to get all the objects count and objects names in webpage using QTP ?..

Answer / devi

Set b=description.Create
b("micclass").value="Browser"
Set obj=desktop.ChildObjects(b)
msgbox obj.count
'browser("CreationTime:=4").close
For i=0 to obj.count-1
msgbox i
c=obj(i).getroproperty("name")
msgbox c

Next

Is This Answer Correct ?    9 Yes 4 No

How to get all the objects count and objects names in webpage using QTP ?..

Answer / sai

Dim a(100)

set p=Browser("Home").Page("Home").ChildObjects
cnt=0
For i=0 to p.count-1
b=p(i).GetTOProperty("micclass")
If i<1 Then
a(0)=b
Else
For j=0 to Ubound(a)-1
If a(j)<>b Then
cnt=cnt+1
a(cnt)=b
End If
Next
End If
Next

Is This Answer Correct ?    1 Yes 1 No

How to get all the objects count and objects names in webpage using QTP ?..

Answer / chandu

Hi kumar...
thanx for ur response man..

r u working on QTP..if yes can i hav ur email id..so that
if i get any doubts i'll get in touch with u..

Thanks in Advance

Chandu

Is This Answer Correct ?    1 Yes 2 No

How to get all the objects count and objects names in webpage using QTP ?..

Answer / kavitha

how to get the position of the object in the application by using function and arguments as (object,the value in the dropdown)

Is This Answer Correct ?    0 Yes 1 No

How to get all the objects count and objects names in webpage using QTP ?..

Answer / chandu

u can count the objects in a webpage by using childobjects
method

set childobjs=Browser("BrowserName").Page
("PageName").childobjects
total=childobjs.count
msgbox total
n i don't know how to get the names...sorry..if u know
plese let me know

Is This Answer Correct ?    0 Yes 4 No

How to get all the objects count and objects names in webpage using QTP ?..

Answer / chivukula.kumar

Hi Chandu,

ChilObjs=Browser("BrowserName").Page
("PageTitle").Childobjects
tol=Chilobj.count

for i = 0 to UBound(tol)

a =chilObjs(i).Name
print a

Next

Is This Answer Correct ?    3 Yes 23 No

Post New Answer

More QTP Interview Questions

HI ALL, HOW WE INSTALL .NET ADD-IN OR JAVA ADD-IN TO THE QTP? PLZ URGENT.ANSWER ME.

2 Answers  


How to handle the exceptions using recovery secnario manager in quicktest professional?

0 Answers  


CAN WE USE 'BVA' AND 'ECP' IN AUTOMATION?

3 Answers   Polaris,


explain keyword driven framework?

2 Answers   Mindlance,


I have to do testing for XML file using QTP. 1. I was given a sample XML, I had to edit that with my actual data and had to make a new XML-- this part is completed, I did that. 2. Now I have to copy the exact contents of that XML file and have to paste it in a web application as a request message for web appliaction processing, using QTP. So I am unable to copy and paste it in web application, please help me out.

1 Answers  






What are the challenges do we face while testing webbased applcations using the automation tool QTP or any?

1 Answers  


What Folder Structure following in Keyword Driven Frame work?

0 Answers  


How many type of status messages are there ..explain?

5 Answers  


Hi friends, I have heard that it is required to have an application hosted in the same machine where we use QTP. Otherwise QTP may identify the objects incorrectly. Please clear me is it true.

3 Answers  


Could you please explain me about QTP framework.

2 Answers   Oracle,


During execution, how can we capture the data from the pop- up, ie. when any popup comes with some numbers written on it, then how can we capture the value/number that is coming on the pop-up and save in the dynamic file/or other file, even when the run is going on.

2 Answers   Wipro,


Explain types of descriptive programming?

0 Answers  


Categories