how to read data from a csv file using Test complete
functional tool..please can anyone post the code
Answers were Sorted based on User's Feedback
Answer / prasad gali
HI Aparna,
Testcomplete is having Drivers to work with any database
such as CSV files,EXCEL files..
This is done in TestComplete using DDT project item.
DDT.CSVDriver("Application Path");
//then wotk with ur CSV file..
Regards
Prasad Gali
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / sheeja paul
var RecNo;
// Creates the driver (main routine)
function TestCSVDriver()
{
var Driver;
Driver = DDT["CSVDriver"]("C:\\MyCSVFile.csv");
// Iterates through records
RecNo = 0;
Driver["DriveMethod"]("csvread.ProcessCSVData");
// Closing the driver
DDT["CloseDriver"](Driver["Name"]);
}
function ProcessCSVData()
{
var i;
for(i = 0; i < DDT["CurrentDriver"]["ColumnCount"]; i++)
{
Log.Message(DDT["CurrentDriver"]["ColumnName"](i));
Log.Message(DDT["CurrentDriver"]["Value"](i));
}
RecNo = RecNo + 1;
}
// Content of MyCSVFile.csv is
//Head 1,Head 2,Head 3,Head 4,Head 5
//Z1,Z2,Z3,Z4,Z5
//Y1,Y2,Y3,Y4,Y5
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / rajkiran
Can we Pass Blank values through CSV file or Excel file to test complete? i tried but it shows "Type Mismatch" Error.
Please help.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nivedita
Can u please pass some piece of code for writing data or
inserting the values in the excel sheet using ddt driver
| Is This Answer Correct ? | 0 Yes | 0 No |
Give some examples for test management tools?
i am living in pune.from 2 months i am searching s/w testing class.but i am confuse which is the good.please send me reply who complete their testing course..i want where teaching is very good & give real project.because many insti.assured placement & real time project,but after addmission it will not be true.so send me reply.i also confuse where i put my query.i hope so,will get reply soon
Generic function for selecting a Radio Button in a Dialog
Tell us what methods of robot class do you know?
What are the phases in automation testing life cycle?
We have a testing assignment that is time-driven. Do you think automated tests are the best solution?
define joins? when you will joins use?
Hi All, I am looking selenium training in Hyderabad. can any one tell me the best training institute/trainer?
What is self-referencing constraint in mainframe development?
Tell us can we find all links on a web page?
How did you use automating testing tools in your job?
why should we choose VSTET(Visual Studio Team Edition for Testers) and not QTP?pleas give me the reasons for "WHY" we have web and client server app, supports power builder and on windows OS so this is the background of tech and envir things we have and now VSTET is good to use or not? if "NO" then tell me why