Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is Ticketing tool? Has it any other names? What is the purpose of this?

2142


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..

1927


Explain about basics of rational robot - ibm test automation tool?

1149


In Selenium how a test suit is run and report is generated.

2098


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.

2279


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.

2088


What are the references for TSL functions.? Could anybody suggest me recommended book for Test Script Language.

2190


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?

2621


Tell me how could ajax controls be handled in webdriver?

1036


IS DATA INTEGRITY TESTING AND INTEGRATION TESTING ONE AND THE SAME?IF DIFF CAN U SPECIFY THE DIFFERENCES

2161


What is the purpose of the wrun.ini file?

1087


Tell me how would you test your own element locator?

1049


is anybody suggest me which one is the best testing institute in ameerpet hydrabad

2212


How is Jmeter tool very useful in projects when it does not have features like online monitoring,WAN emulation,caching like other performance tools.

2480


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 :-)

2010