how to read data from a csv file using Test complete
functional tool..please can anyone post the code
Answer Posted / 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 |
Post New Answer View All Answers
Is automation testing a black box testing or white-box testing?
hi i would like to know is there any training institue for Calabash,robotium and ui automator in hyderabad...urgent
How do select which automation testing tool is the best for you?
Kindly let me know how to setup JMeter for functionality testing of a Web application.. The apache help doc is good but i m little confused with it... :(
I want to learn the data base testing, how can I start my psactice? I already reading the books of basic for data base? If any other books that make my study simple please suggest.
Is there any freeware tool for automation testing of mobile applications for BlackBerry and iPhone platforms ?
Kindly let me know how to setup JMeter for functionality testing of a Web application.. The apache help doc is good but i m little confused with it... :(
Tell me how can the user get a text of a web element?
What are the different types of scripting techniques for automation testing?
Describe some problem that you had with automating testing tool.
Do you know how to verify if the checkbox/radio is checked or not?
Explain me what is testng and why is it better than junit?
What is the Differnce between Client/Server Testing and Web Based Testing?
How can you create html test report from your test script?
How software testing is handled?