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

what are the settings to be done to make the recovery scenario created for one test to be used bye all the other tests. please tell me recovery scenario process in detail.

1 Answers  


whare exactly we have to use functions and sub routain

0 Answers  


will QTP 9.2 run successfully on Linux(gui) operating system

1 Answers  


• What type of testing questions will be asked for 2+ yrs exp people in interview?

0 Answers  


Is QTP Object Oriented language or Object Based language? What are the OOPS concepts it will support? Why it wont support all the OOPS concepts?

1 Answers   CTS,






what is KEYWORD DRIVEN TESTING ? I M NOT ASKIN WHAT IS KEY WORD VIEW PLZ ANS FOR ONLY WHAT IS KEYWORD DRIVEN TESTING EXACTLY THANX

3 Answers  


What is parameter in qtp?

0 Answers  


Hi all, In Every interview interview asking one question what type of challenges you have been faced in your project?

1 Answers  


I am using environment variable xml to give credenatials for login into unix. Is there any way we cam mask the password in the xml?

0 Answers  


Why we are selecting QTP for testing ?

20 Answers   HP,


Write a script to verify font style and color of a windows object using descriptive programming

0 Answers  


How to Test the mainframe application?(tell me few basic things)

3 Answers  


Categories