Forum Discussion
I have updated my script as you said.
but Error Occurs "Item cannot be found in the collection corresponding to the requested name or ordinal"
function adminLogin(page,form,browser,Driver,userName)
{
var textbox;
var table;
var panel;
page.Wait();
form = page.formAspnetform;
textbox = form.textboxTxtusername;
textbox.Click(78, 12);
textbox.SetText(userName);
}
function main()
{
var browser,page,form,Driver;
Browsers.Item(btFirefox, "", Browsers.pX64).Run("http://sysnetportal1/RVTesting_1/");
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.Value('UserName'));
Driver.Next();
}
}
I have attached my CSV file for your reference:
When i tried to print column name using script :
temp=DDT.CurrentDriver.ColumnName(0);
Log.Message("Value of column is " + temp);
Message shown as "Value of column is UserName_Password ", why both column has combined
when i tried to access DDT.CurrentDriver.ColumnName(1);
Again Error occurs as "Item cannot be found in the collection corresponding to the requested name or ordinal"
Can you please on this, to retrieve my Username and password in CSV file.
The reason being is that it looks like you file is using some other delimiter than a comma to separate your columns. What delimiter are you using?
If you're using a delimiter other than a comma, you need to specify the delimiter or other necessary information in a schema.ini file stored in the directory with your CSV file. See https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/csv-storages.html
- Manojrsr8 years agoContributor
Thanks for Information. As you said, i have made Changes in CSV File using delimiter. now i can able to Read data and pass value to script
Related Content
- 2 months ago
Recent Discussions
- 2 days ago
- 2 days ago