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
Tell me how could ajax controls be handled in webdriver?
Tell us what is the difference between getwindowhandles() and getwindowhandle()?
What is difference between selenium and QTP tools Which is best tool... Which is most used tool
Tell me the fundamental difference between xpath and css selector?
What are the references for TSL functions.? Could anybody suggest me recommended book for Test Script Language.
how to write ciertification in QTP?
how to know whether the user information or any other information which is entered in to the web is storing in secured place or non secured place?
Give some examples for test management tools?
When will you not automate testing?
What is tsl?
pls tell me any open source test case managment tool ? its urgent.also tell me any autmation testing tool also for functional testing?
I want to test a mobile software by an automation tool which is a IP telephony based software designed for both ios and android phone, basically this apps is develop for make call though few low cost audio codecs from Aircraft to Ground and Ground to Aircraft so anyone can suggest me which testing tool we can use for it
What are the advantages of test automation?
Name a couple of standard web function found in the function generator?
How to select an automation tool best matched for your project?