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 you know that a test case is a regression test case

1 Answers  


how can i call reusable action in a function could any one explain me?

2 Answers   Livetek,


what is error and fault in terms of software quality?

0 Answers   TCS,


How to send the qtp results file by email (Lotus notes).

1 Answers   TCS,


what is description object?

0 Answers  






Hi, i am rani ,i am putting 1+years of fake exp ,so pls anyone explain how i get project (in real time) ? how it is tested ex: in banking ,test the number of textboxes in one window

3 Answers  


whaht is the difference between CLASS & OBJECT?

3 Answers   Accenture,


Tell about automation object model(Aom) in qtp?

6 Answers   GE,


We have an action attached with the library file in QTP. When I will click on run button,which file is going to be executed first a)Action b)Library

1 Answers  


I am in need of some set of QTP FAQ @ interview. Also recently in one of interview portal they asked me how you write the script for Login application which it is web -based and using Descriptive Programming? Without associating the shared object repository?Please i do need this answer very soon? Please respond me soon @ vaisu72@yahoo.com

2 Answers  


How to associate shared object repository to test in qtp?

0 Answers  


Java add-in is need to work on java oriented project ?

3 Answers  


Categories