Write a user defined function to count the no. of buttons
existed in a webpage ? i dont want to use descriptive.create
()

Answers were Sorted based on User's Feedback



Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to us..

Answer / pramod

1)Open Flight Reservation Login page
2)Add Login page in to the Object Repository
3)Write below code and run it

' Directly pass the login as argument to the function
childobj Dialog("Login")

' The function will take object as input argument and count
the child objects in the login page
Function childobj(CountObject)

aa=CountObject.ChildObjects.count
msgbox aa
End Function




Thanks
Pramod
pramod_login@yahoo.com
9845454652

Is This Answer Correct ?    2 Yes 0 No

Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to us..

Answer / ram.polavarapu

function countedit()
dim e
e=0
n=browser("").page("").chaildobjects

if n="WebEdit" then
e=e+1
print e
next
end function

Is This Answer Correct ?    2 Yes 1 No

Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to us..

Answer / geetha

Set list = browser("XYZ").Page("ABC").ChildObjects
countbutton (list) 'Pass the object to function

Function countbutton(allitems)
cnt = allitems.count
num=0
For i=0 to cnt-1
name1 =allitems(i).getroproperty("micClass")
If name1="WebButton" Then
print "position of web button is " &i
num = num+1
End If
Next

print "count of webbuttons present in a page are" &num
End Function

Is This Answer Correct ?    1 Yes 0 No

Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to us..

Answer / krishna chand

Hi,

If u got answer to this question can u plz snd me 2 also.
I 2 got this same question in Kanbay

Is This Answer Correct ?    0 Yes 0 No

Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to us..

Answer / suchitra k

hi
we are having one property in qtp child objects.it returns
collection of objects contained with in the object.

Is This Answer Correct ?    1 Yes 3 No

Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to us..

Answer / pramod hitnalli

1)Open Flight Reservation Login page
2)Add Login page in to the Object Repository
3)Write below code and run it

ChildObj=Dialog("Login").ChildObjects.count
msgbox ChildObj


Thanks
Pramod
pramod_login@yahoo.com
9845454652

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More QTP Interview Questions

how can i prepare for QTP(8.2) to face interview ? give over view details?

52 Answers  


How to Upgrade or support firefox 2.0 version on QTP 9.0? I have installed QTP 9.0 and installed firefox 2.0. But in REcord and Run Settings, it shows firefox 1.5 in Web tab for browser selection.

0 Answers   TCS,


what is descriptiveprograming? how to do object identification thrugh Descriptive and is possible smart identification or not

5 Answers   Syntel,


When a requirement is given to u to automate , What is ur basic approach ?

4 Answers  


Explain the check points in quicktest professional (qtp)?

0 Answers  






Login to flight app, in window flight reservation set the date field and select flyfrom as Frankfurt and verify whether flyto list box has the item FrankFurt, log the results.

1 Answers   Cap Gemini,


i have string "I LIKE INDIA"..how to i get LIKE from the sting..

6 Answers   HealthAsyst,


1)What is the Difference Between WaitTo & Sync?

4 Answers   Wipro,


How we can test a Frame in a web page?

1 Answers   eMids,


If a object property is changed in the application. where it should be updated in QTP... Pls anybody can give the answer.. Thanks in advance...

4 Answers   Navis,


They asked by using qtp recording writing scripting

0 Answers   Wipro,


Can we directly start working with QTP without any knowledge on WinRunner? (After getting trsining on QTP)

1 Answers  


Categories