How to Retrieve data from CSV File
Hi Team,
Im using CSV File to read data and pass value to Script.
CSV File as :
UserName | Password |
devarajulu.m | 123456 |
manoj.s | Password1 |
I need to pass value Username password for first iteration of data and second so on.,
how to retrieve cell value in CSV. can you provide example script.
function main()
{
var browser,page,form,Driver;
Browsers.Item(btFirefox, "", Browsers.pX64).Run("AppURL");
browser = Aliases.browser;
Driver=DDT.CSVDriver("C:/Users/Manoj.S/Desktop/Test complete forum doubts/RVData.csv");
while(!Driver.EOF())
{
page=browser.pageWelcomeToReferralvalet8;
loginClick(page,browser);
page = browser.pageWelcomeToReferralvalet7;
adminLogin(page,form,browser,Driver);
Driver.Next();
}
}
function adminLogin(page,form,browser,Driver)
{
var textbox;
var table;
var panel;
page.Wait();
form = page.formAspnetform;
textbox = form.textboxTxtusername;
textbox.Click(78, 12);
textbox.SetText(Driver.Value(1));
}