what is keyword driven framework in qtp.
Answer Posted / deven
Keyword Driven Framework is a type of QTP Framework where
for a particular test case, you would first identify a set
of Keywords and then associate an action (or function)
which each of these keywords.
'Option Explicit
'Include library files
executefile "C:\Test\Library5.qfl"
'add sheets
datatable.AddSheet "dtSheet1"
datatable.AddSheet "dtSheet2"
datatable.AddSheet "dtLogin"
'import test case and test steps sheets from excel to data
table
datatable.ImportSheet "C:\Test\testcase.xls","Sheet1","dtShe
et1"
datatable.ImportSheet "C:\Test\testcase.xls","Sheet2","dtShe
et2"
datatable.ImportSheet "C:\Test\testcase.xls","Login","dtLogi
n"
Dim tcrows,tsrows
'get row count from data table sheets
tcrows=datatable.GetSheet("dtSheet1").GetRowCount
tsrows=datatable.GetSheet("dtSheet2").GetRowCount
For i=1 to tcrows
datatable.GetSheet("dtSheet1").SetCurrentRow(i)
If datatable.Value("Execute","dtSheet1")="Yes" Then
For j=1 to tsrows
datatable.GetSheet("dtSheet2").SetCurrentRow(j)
If datatable.Value("TCID","dtSheet1")=datatable.Value
("TCID","dtSheet2") Then
Select Case datatable.Value("Keyword","dtSheet2")
Case "openapp"
tsresult= openapp()
Case "login"
tsresult= login(datatable.Value
("Agentname",dtLogin),datatable.Value("Password",dtLogin))
End Select
If tsresult="Pass" Then
TestCaseResult=tsresult
End If
'Else
Exit for
End If
datatable.Value("Result","dtSheet2")=tsresult
Next
datatable.Value("Result","dtSheet1")=TestCaseResult
datatable.Value("Result","dtSheet2")=tsresult
End if
Next
datatable.Exportsheet "C:\Test\testcase.xls","dtSheet1"
datatable.exportSheet "C:\Test\testcase.xls","dtSheet2"
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what r the verstions from 1st to present (verstions) of mercury tools (like winrunner,QTP,Loadrunner) ? Chandana
Discuss quicktest professional environment?
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
How you can find the absolute value of the number in qtp?
how to create flat file datasubmission in qtp
if anyone has idea of the interview procedure in covansys, plz send me a mail?
To which environments does quicktest professional supports?
I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?
what is the hierarchy to use properties in descriptive programming
What are the different properties of an web object
Did QTP prove efficient for your project? Yes or No, explain?
How did you resolve conflicts present in Object Repository?
can any one say that where we can download the QTP trail version ??????????
What is the purpose of loading qtp add-ins?
what is the latest version of QTP? Main difference between 9.2 and 10 version