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 are the different kinds of test steps?
What is environment variable in qtp and why to use it?
When using descriptive programming?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.
What is the difference between run time object and test object in QTP?
How to data driven test for Win objects in QTP ?
hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]
Should have experience in framework means?
whow much strong on VB and C?
what is supply chain management?
What is the difference between keyword view and expert view?
what is the difference between data driver & data driven and driver script?
What is the diff between image and bitmap check point?
Key word driven framework
I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”