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
With what extension you can save the list of tests in a file to run in test batch runner?
What is the difference between a Function and Procedure in QTP?
What is CMMP and CMMH?
What is an optional step in qtp ?
what are the critical test cases in crm? tell me atleast 5 critical test cases? what are the critical bug u find out while testing crm domain?
I want two test two agents login for the flight website. Here is the scenario: I want to go through 1-3 rows for one user login and other user login I want to go though 3-5 rows. How would you set this up in qtp. Thank You
Which environments are supported by hp qtp?
In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?
What is the default add-ins in qtp?
When and why to use descriptive programming?
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how
Explain the concept of how quicktest professional identifies object?
Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B
Explain calling sub procedure.
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?