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
if numbers are always changing write a script for that
What are the advantages of Object Repository?
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
What are main panes available in qtp test browser?
how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)
I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me
any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in
tell me abt a time when u had to go above &beyind the call of duty to get the job done
What are the types of data tables in qtp?
What is clean sweep?
What is difference between shared and local object repository?
Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?
Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance
Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?
What is the difference between per-action and shared?