RSS Feed for QTPCategory: QTP

Quick Test Professional Questions & Answers Part 2 »

11.Keyword view in QTP is also termed as
Icon based view
12.What is the use of data table in QTP?
parameterizing the test
13.What is the use of working with actions?
To design a modular and efficient tests
14.What is the file extension of the code file and object repository file in QTP?
The extension for code file is .vbs and the [...]

Quick Test Professional Question & Answers Part 1 »

1.What is Quick test pro?
Its a Mercury interactive’s keyword driven testing tool
2.By using QTP what kind of applications we can test?
By using QTP we can test standard windows applications,Web objects,ActiveX controls,and Visual basic applications.

3.What is called as test?
Test is a collection of steps organized into one or more actions,which are used to verify that your [...]

How to connect to a database? »

code:
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
Set objConnection = CreateObject(”ADODB.Connection”)
Set objRecordset = CreateObject(”ADODB.Recordset”)
objConnection.Open “DRIVER={Microsoft ODBC for Oracle};UID=;PWD=

objRecordset.CursorLocation = adUseClient
objRecordset.CursorType = adopenstatic
objRecordset.LockType = adlockoptimistic
ObjRecordset.Source=”select field1,field2 from testTable”
ObjRecordset.ActiveConnection=ObjConnection
ObjRecordset.Open ‘This will execute your Query
If ObjRecordset.recordcount>0 then
Field1 = ObjRecordset(”Field1″).Value
Field2 = ObjRecordset(”Field2″).Value
End if

How can i check if a environment variable exist or not? »

When we use Environment(”Param1″).value then QTP expects the environment variable to be already defined. But when we use Environment.value(”Param1″) then QTP will create a new internal environment variable if it does not exists already. So to be sure that variable exist in the environment try using Environment(”Param1″).value.

My test fails due to checkpoint failing, Can i validate a checkpoint without my test failing due to checpoint failure? »

code:
Reporter.Filter = rfDisableAll ‘Disables all the reporting stuff
chk_PassFail = Browser(…).Page(…).WebEdit(…).Check (Checkpoint(”Check1″))
Reporter.Filter = rfEnableAll ‘Enable all the reporting stuff
if chk_PassFail then
MsgBox “Check Point passed”
else
MsgBox “Check Point failed”
end if

How can i check if a checkpoint passes or not? »

code:
chk_PassFail = Browser(…).Page(…).WebEdit(…).Check (Checkpoint(”Check1″))
if chk_PassFail then
MsgBox “Check Point passed”
else
MsgBox “Check Point failed”
end if

What’s the difference between a checkpoint and output value? »

Checkpoint only checks for the specific attribute of an object in AUT while Output value can output those attributes value to a column in data table.