Forum Discussion

danza3000's avatar
danza3000
New Contributor
7 years ago

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...
  • tristaanogre's avatar
    7 years ago

    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.