Usage of Description Object is shown below
Creates a new, empty description object in which you can add collection of properties and values in order to specify the description object in place of a test object name in a step.
Set Button=Description.Create()
Button("type").Value="submit"
Button("name").Value="Google Search"
Button("html tag").Value="INPUT"
Browser("Google").Page("Google").WebButton(Button).Click
TO CHECK ALL THE CHECKBOXES ON A PAGE USING CHILDOBJECTS PROPERTY
Dim obj_check
Set obj_check=Description.Create
obj_Check("html tag").value="INPUT"
obj_Check("type").value="checkbox"
Dim allcheckboxes
Set allcheckboxes=Browser("Browser").Page("orkut - home").ChildObjects(obj_check)
a= allcheckboxes.count()
msgbox a
For i=0 to (a-1)
allcheckboxes(i).Set "ON"
Next
QTP VBScript new series + Interview Question Bank on QTP for enrichment of Knowledge in QTP
This Site has been brought to you by HP Certified Expert of QTP.
Exciting new articles for October:
1) QTP Tip:Deselect all Radio Buttons
2) HP QTP Crypt Object
3)Adding Hyperlinks in Excel Spreadsheet
Best of Luck Friends ! ! !
Expert QTP
expert.qtp@gmail.com
All Articles are Copyright Protected. These are Free for Reading & Personal Use. Reproduction in Any Form without the Permission is Illegal & Strictly Prohibited.
Copyright © 2009 ExpertQTP
Google Search
Friday, June 6, 2008
Descriptive Programming to check all checkboxes in a webpage
Labels:
Descriptive Programming
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment