Write a user defined function to count the no. of buttons
existed in a webpage ? i dont want to use descriptive.create
()
Answer Posted / 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 |
Post New Answer View All Answers
What is the virtual object?
www.icici.com after this home page wll came, in this page what r the items we r going to test for manual and what the element we r test for QTP... explian clearly with example
how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up
What are the key points to create a framework in QTP for oracle forms?
Is it possible to merge two object repository files in qtp?
What are the views available in qtp?
What are the types of data tables in qtp?
How you can delete excel file in qtp?
Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?
What is a Patch in QTP?
How to recognise the webelement and verifying that webelement is enabled?
What is ‘object spy’ and what is the function of object spy in qtp?
What is object spy in quicktest professional (qtp)?
How will you compare keyword and expert view?
What is the keyword view and expert view in qtp?