did you perform retesting(DATA DRIVEN test) using functions
with out using datatable methods
how can you perform retesting using functions
Answers were Sorted based on User's Feedback
Generally, QTP exports uses Excel file for data
paramaterization.
Method 1)Prepare test data in Excel sheet and import into
QTP data table. Using DataTable methods, user can easily
parameterize data and access them through out the script.
DaTaTable Methods: Import, ImportSheet, Export,
ExportSheet, GetSheet, SetCurrentRow, SetNextRow etc...
E.g:
DataTable.Import "Excel file path"
testData = DataTable(columnName, Sheetname)
(or)
testData = DataTable(columnName, dtGlobalSheet)
Method 2)Prepare test data in Excel sheet. Instead of
importing Excel file/sheet into Test script, create an
Excel object in the script using CreateObject method. Using
Excel object methods user can able access data from excel
sheet.
E.g:
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.WorkBooks.Open "Excel file path", false, false
Set currentWorkSheet = ExcelObj.ActiveWorkBook.WorkSheets
(1) 'first sheet
testData = currentWorkSheet.Cells(rownumber,
columnnumber).Value
ExcelObj.Application.Quit
| Is This Answer Correct ? | 2 Yes | 0 No |
May be solution i'm providing is not a DataDriven but it is
useful.
We can access the object property at runtime and then append
something in the property and then again insert into the object.
Like we have a text box amount having value = 10
So we can use
value1 =
Browser(".*").Page(".*").WebEdit("amount").GetroProperty("value")
value1 = value1 + 1
Browser(".*").Page(".*").WebEdit("amount").Set value1
| Is This Answer Correct ? | 0 Yes | 0 No |
Question:did you perform retesting(DATA DRIVEN test) using functions with out using datatable methods.
Answer: With out using datatables we can do the retersting using below methods
1. File System objects(Using note page)
2. Database connections(SQL, Oracle, MS Access)
3. Environment variables
4. Random numbers, Excel methods, Inputbox
5. Parameters(Actions and Test Parameters)...ETC
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the views available in quicktest professional?
Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....
What is recovery scenario in qtp?
What is an optional step in qtp ?
how to read log file using QTP??
What is wrong in my code?
What all challenges you have faced during automation and how you have resolved it?
What is a checkpoint? How many check points are there in qtp?
Does the Existing reusable action can be modified at the time of calling the action?? Please help me..
hi This is Harish.1. What is object repositery .2. what is frame works in QTP,what is keyword driven frame work,explain it and how to associate the folders.3.the build is developed in java, can we write scripting in vb .4.what is discriptive progaram,how to write it.5.what is process of QTp testing.6. how to associate the shared repository. 7.what is implicit and explicit 8.what is runtime data please replay me regards Harish
Create an Excel file and pass the values from Flat File? (for ex:data1.txt,data2.txt )
anyone can explain the following concepts. 1.diff b/w Linear and modular framework 2.diff b/w keyword and hybrid framework