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

Is it a smart choice to use QTP for backend testing?

1 Answers   CTS,


Hi Friends, Can any one answer this question? 17) What method is used to retrieve the number of columns in the query results? A. Fields.Count B. Fields.Item(EOF) C. Fields.Count(BOF) D. Fields.Count.Value

2 Answers  


i have 2 year experience in manual and automation testing, I have less percentages in X, Xii (Second grade), can i elgible to TCS interview (Or MNC's)

3 Answers  


Explain how you can replace string in qtp?

0 Answers  


How can the expected image for a bitmap checkpoint be recaptured in QTP

2 Answers   Ordain Solutions,






If u r using library files (Instead of Check Points) , How do u do bitmap check ?

0 Answers  


How to find given string is palindrome or not without using strreverse() function?

2 Answers  


Hello Guys, Can anybody Explain me about Automation framework?? and how can we prepareAutomation Framework using QTP

3 Answers   CTS, IBM, Sapient,


What is QTP’s model for test creation?

0 Answers  


There is web page with the webtable,this contains some data, how do you manipulate the data.

2 Answers   Tech Mahindra,


Explain the check points in QTP?

2 Answers  


Hi All, I wanted know how does QTP identifies a DataCombo. While recording I clicked on the data combo and selected a value from the list. The click of Data Combo is recorded but the selection of the value from the list is not recorded. My application is based on VB and SQL server as the database. Please let me know as how do I record the action of selecting a value from a DataCombo list. The list is being loaded from the Database Record set.

0 Answers  


Categories