-
Junior Member
Create a table in excel
How want to create a table in excel through which winrunner reads the data according to the parameters
-
Expert Member
Re: Create a table in excel
Hi,
Firstly create a Excel sheet with required Column names and specify the data required under it.
Data-driven tests in Winrunner as basically carried out using the ddt statements. The following steps would provide a guideline as to how to read data from an Excel file and parameterize your script -
------------------------Start of Code---------------------------
Datatbl = ddt_Open("Path of Excel File", ddt_mode_read);
ddt_get_row_count(Datatbl,rowcount);
## Rowcount is the output variable where number of Rows is stored.
for(i=0;i
your field.value = ddt_val(Datatbl,parameterName);
ddt_next_row;
## ParameterName would be the Column Name in Excel sheet under which your data would be stored.
-------------------------End of Code-----------------------------
You could also the Data-Driver wizard to carry out parameterization. Select the Excel file you have created, map the parameters to the columns in the Excel. It should generate the same code listed as above.
Cheers....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules