DDT.CurrentDriver' is null or not an object
i keep getting this error on my testing using javascript. I have looked all materials within smart bear...not sure what else to do.
This is what i have so far.
function DriveMyTest()
{
var mycsv;
mycsv = DDT.CSVDriver("C:\\TestComplete\Book1.csv");
mycsv.DriveMethod("ScriptTest.Test1");
}
function Test1()
{
textbox = panel.textboxClaimLabOrderId;
textbox.Click(72, 1);
textbox.SetText(DDT.CurrentDriver.Value("textboxClaimLabOrderId"));
}
Hoping this is not a typo in your post... but you have a problem in your code.
Since you're using JavaScript, you need to make sure you use the double-backslash for all slashes in your file path.so... change this:
mycsv = DDT.CSVDriver("C:\\TestComplete\Book1.csv");
to this
mycsv = DDT.CSVDriver("C:\\TestComplete\\Book1.csv");
and try again. CurrentDriver will be "null" if the CSVDriver method failed to return a driver... which it would if the file path is incorrect.