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



did you perform retesting(DATA DRIVEN test) using functions with out using datatable methods how..

Answer / amarendra kothuru

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

did you perform retesting(DATA DRIVEN test) using functions with out using datatable methods how..

Answer / raj

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

did you perform retesting(DATA DRIVEN test) using functions with out using datatable methods how..

Answer / cnu_thatavarthi

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

Post New Answer

More QTP Interview Questions

What are the two types of repositories available, explain them?

0 Answers  


In this bellow script QTP is not able to getting no. of Links from my Browser. Set desc=description.create desc("micclass").value="Link" Set obj=Browser("creationtime:=0").page("title:=.*").childobjects(desc) msgbox obj.count I am getting "General Run Error".Why QTP is not supporting my Browser,but its running fine in other system.Please help me to overcome this problem.

1 Answers  


I have 14 itmes in a drop down that are associated with an account And these items change with different accounts I want to be able to define it by and index number or any other id so if I enter 2 in my Global excel sheet it selects the 2nd item from the drop down - is this possible?

5 Answers   Rogers,


I have a Webtable object in my shared object repository, say WT1, which has different index value in 2 different versions, one version having WT1's index value as 1 and other version having WT1's index value as 2. how could i use same test script to identify the WT1 object having different index values.

5 Answers  


Can anybody help me by sharing the code for checkbox in qtp using vbscript.

2 Answers  


What is the use of sendkeys.In which cases we Use this sendkey.Pls explain with example.

3 Answers   Cap Gemini,


What are output values and why they are used ?

0 Answers  


I have 1 to 10 action are there, i want action1 output becomes to action 10 input? pls any can give script for this scenario?

5 Answers   AZTEC,


why qtp supports vbscript? and not for others just like cgi,phython,shell,perl,html and all..

4 Answers   Cap Gemini,


Where should we turn Smart Identification ON in QTP?

5 Answers  


what is the data driven testing?

0 Answers  


plz explain QTP real time work( Means where you store scripts and how u access scripts next day? where those activities we are maintaining, If By usig VSS how the process in going on , plz explain briefly?

2 Answers   CTS, Tech Mahindra,


Categories