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
I want two test two agents login for the flight website. Here is the scenario: I want to go through 1-3 rows for one user login and other user login I want to go though 3-5 rows. How would you set this up in qtp. Thank You
we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?
What is recovery scenario manager? When you go for recovery scenario manager?
Explain different recording modes?
Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.
Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?
If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?
what type of framework u r using in ur organization
Explain the use of action split in qtp?
What is RTM (require ment tracebulity marix) fromate?
"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...
What is the pros and cons between QTP and Rational Robot
What are the Application Functions available in QTP?
what is actually contain test report? can anybody post the test report
How is test case write?