By admin, on June 24th, 2010
‘ 1.how to open browser in vb script
set ie=createobject(“internetexplorer.application”)
ie.navigate(“http://www.google.co.in/”)
ie.visible=true
set ie = nothing
‘ 2.Why to use option explicit in vb script
‘If we declare variables with some values and while using if we use (spell mistake) then user can’t know
‘ putting option explicit is useful there
‘ Example starts here
option explicit
dim abcd
abcd=20
msgbox abcd
dim bcde
bcde=30
msgbox bcdef
’3.how to open a file . . . → Read More: vbscript interview questions and answers
By admin, on June 19th, 2010
Object Repository Concept in qtp :
Object Repository: It is a place where qtp stores the objects(Ex:buttons or Check Boxes) information.
There are two types of Object Repositories
1.Local Object Repository
By default if we record any test,that goes to Local Object Repository.
We can edit or delete object properties. Only that test can use that object repository.
2.Shared Object Repository
If we . . . → Read More: Object Repository Concepts in qtp with examples
By admin, on June 14th, 2010
1.Check whether the button exists or not. If exists,check whether it is enabled or not.
If enabled,click on that button.
Install actiTIME1.5 into ur system. Add Login now button to the Object Repository.Then write the code in qtp
Set mybutton=browser(“actiTIME – Login”).Page(“actiTIME – Login”).WebButton(“Login now”)
buttonclick mybutton ‘ function call
Function buttonclick(mybutton)
sstepname=”Button click”
sobjtype=mybutton.ToString ‘ returns name and type of the object
msgbox . . . → Read More: actiTIME web application examples in qtp
By admin, on June 7th, 2010
Check Points :
To check whether the expected value is matching with the actual value or not, we use check points in qtp
1.Standard CheckPoint :
Is used to Check the object property values
Example For Standard Check Point:Goto Flight Application
Enter agent name “venkatesh” and then record .
Goto–Insert–Check Point–Standard Checkpoint
Click on venkatesh.Then we have added the check point.Click on Cancel.
Exexute . . . → Read More: CheckPoints in qtp
By admin, on June 6th, 2010
Regular Expression Example :
Action1 :
systemutil.Run “C:\Program Files (x86)\HP\QuickTest Professional\samples\flight\app\flight4a.exe”
Dialog(“Login”).WinEdit(“Agent Name:”).Set “venkatesh”
Dialog(“Login”).WinEdit(“Agent Name:”).Type micTab
Dialog(“Login”).WinEdit(“Password:”).SetSecure “4c0ba4645292b686779b42c81dd13093544face9″
Dialog(“Login”).WinEdit(“Password:”).Type micReturn
Action2 :
Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).WinMenu(“Menu”).Select “File;Open Order…”
Window(“Flight Reservation”).Dialog(“Open Order”).WinCheckBox(“Order No.”).Set “ON”
Window(“Flight Reservation”).Dialog(“Open Order”).WinEdit(“Edit”).Set DataTable(“order_no”, dtGlobalSheet)
Window(“Flight Reservation”).Dialog(“Open Order”).WinButton(“OK”).Click
Window(“Flight Reservation”).Activate
Action3 :
Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).WinMenu(“Menu”).Select “File;Fax Order…”
Window(“Flight Reservation”).Dialog(“Fax Order No. 1″).ActiveX(“MaskEdBox”).Type “11111111111111″
Window(“Flight Reservation”).Dialog(“Fax Order No. 1″).WinButton(“Send”).Click
Window(“Flight Reservation”).Activate
Action4 :
Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).Close
Goto Global Data Table :
make “A” as “oder_no” . . . → Read More: Regular Expression example in qtp

Recent Comments