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
What is Ticketing tool? Has it any other names? What is the purpose of this?
Hi vishal, Thanks for your reply... But i am not using Mozilla fire fox.. I am using IE 7.. Could you suggest me in this case.. I have tried with Rational tools which i am getting some installation problem and netvantage..tool....which i felt i can't write script for that.. please guide me in this..
Explain about basics of rational robot - ibm test automation tool?
In Selenium how a test suit is run and report is generated.
hi to all, if we open a browser(for ex. yahoomail.com) using navigate command. the cursor by default focussing on the 'yahoo id' html edit box. how to get the label(ie.,yahoo id) of that html edit box using descriptive program. here we should not use identify tool to get the property,thtml editbox method. by tracing the cursor position we have to get the label name. is it possible? please let me know.
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.
What are the references for TSL functions.? Could anybody suggest me recommended book for Test Script Language.
Hi I need the following information about JMeter 1) How many(max) threads(users) can hit the website using Jmeter? 2) How long(in hours) can we run Jmeter for stress test? (Is there any “Memory full” issue if we run for long time?) 3)What typeof sampler to use for clicking on the link?
Tell me how could ajax controls be handled in webdriver?
IS DATA INTEGRITY TESTING AND INTEGRATION TESTING ONE AND THE SAME?IF DIFF CAN U SPECIFY THE DIFFERENCES
What is the purpose of the wrun.ini file?
Tell me how would you test your own element locator?
is anybody suggest me which one is the best testing institute in ameerpet hydrabad
How is Jmeter tool very useful in projects when it does not have features like online monitoring,WAN emulation,caching like other performance tools.
Hi all, Do anyone have the experience in PDF Document Automation using OLE objects and methods? If so suggest the best websites for source. Thanks :-)