Forum Discussion

zakirhere's avatar
zakirhere
Occasional Contributor
11 years ago

[TestComplete] Set ID to bootstrap/JQuery object


The application I am testing is developed in ASP.NET and have some validation messages and popover messages implemented through bootstrap and JQuery JS file.



Since they are created on the fly there is no way our developer thinks they can give an ID to those objects.



I was wondering if there is a way that we can set an ID to those objects or the only option I have to use FindChild by using the innerText property in TestComplete tool?


1 Reply

  • Hi Zakir,



    Yes, it is possible to add IDs to objects created with JQuery. This example is for buttons, when you configure a dialog:




    buttons: [{


      id: "dialog_create",


      text: "CREATE"


    },{


      id: "dialog_cancel",


      text: "CANCEL",


      click: function() {


        $(this).dialog("close");


      }


    }]