Forum Discussion

laxmikanth's avatar
Frequent Visitor
9 months ago

TypeError: Cannot read property 'Name' of null

I have integrated testcomplete with azuredevops i have executed testcases but some testcases are failed getting below error ,

TypeError: Cannot read property 'Name' of null


3 Replies

  • rraghvani's avatar
    Champion Level 3

    Does the 'Name' property exist? What is the property value of 'Name'? Are you checking the null values? What actions are you performing to get this error?

  • KB1's avatar
    Champion Level 2

    I experienced a comparable situation yesterday as well. It is possible that there is an issue with your execution plan. I would recommend carefully reviewing the parameters you have provided.

  • AlexKaras's avatar
    Champion Level 3



    Cannot read property 'Name' of null

    This means that the object that is expected to provide Name property was not found/does not exist.

    Sample pseudocode:

    var obj = page.FindChildByXPath("non-existing XPath"); // object does not exist and null is assigned to obj variable

    Log.Message(obj.Name); // this will fail with the above error