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 |
How many tabs are available to view your test in a test pane and what are they?
How many types of Automation frameworks are there in UFT? Describe them.
how do u prepare Test Environment ?
how to test power point using QTP 8.2 ? What are different methods to retrieve value from Application during runtime ?
how to write scripts in QTP?
Which statement will use for close an action in QTP?
Local Obj Repository and SOR are editable know, y we have to edit those.. i mean in which situation we need to edit those and how to do..? pls help me..
i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji
when u script reveiwing in which area u more concentrates?
How to face prjoect manager round what type of questions they will Ask ? (Chandana)
1 Answers Call Centre, Convergys, IBM,
WHAT IS ENVIRONMENT VARIABLES?
What is User defined function in QTP