Forum Discussion

hinabatooq's avatar
hinabatooq
New Contributor
3 years ago

Import unit is not working

Hi there,

I have installed updated version of the Test complete. After which i tried to import another unit to my main unit script. Which started to give me an error as "

TypeError: Cannot read property 'Login_TC' of undefined". The same unit is working fine in my older units in which i imported before the new release. My work is on halt because of this. Kindly look into this asap.
Thanks in advance.
  • rraghvani's avatar
    rraghvani
    3 years ago

    Here's an example,

    I noticed while using the Import Function, that it had created the following line,

    var Unit1 = require["Unit1"]

    which is incorrect for JavaScript. It should be using round brackets and not square brackets.