Script to get count,names of all open browsers and to close them.
Set b=Description.Create
b("micclass").value="Browser"
Set obj=Desktop.ChildObjects(b)
msgbox obj.count
For i=0 to obj.count-1
c=obj(i).getroproperty("name")
msgbox(c)
obj(i).Close
Next
Read more...
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
Showing posts with label Descriptive Programming. Show all posts
Showing posts with label Descriptive Programming. Show all posts
Friday, June 6, 2008
Descriptive programming for Google search page
Descriptive programming for Google search page
SystemUtil.run "iexplore.exe","http://www.google.com"
Browser("name:=Google.*").Page("title:=Google.*").WebEdit("name:=q")
.set"Testing"
Browser("name:=Google.*").Page("title:=Google.*").
WebButton("name:=Google Search").Click
Read more...
SystemUtil.run "iexplore.exe","http://www.google.com"
Browser("name:=Google.*").Page("title:=Google.*").WebEdit("name:=q")
.set"Testing"
Browser("name:=Google.*").Page("title:=Google.*").
WebButton("name:=Google Search").Click
Read more...
Labels:
Descriptive Programming
Descriptive Programming to check all checkboxes in a webpage
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
Read more...
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
Read more...
Labels:
Descriptive Programming
Subscribe to:
Posts (Atom)
