Forum Discussion

vinodkumar_chau's avatar
vinodkumar_chau
Contributor
11 years ago

Clicking on object using controlID

Hi ,



I have written the below code to get the control id , but how do I click on object using this control id .




getid = meterLink.dlgMeterName.btnOK



Log.Message(getid.ControlId);



var i = getid.ControlId;


1 Reply

  • Hi Vinod,

     


    You can try recording the test that would click the object you need. Refer to the "Recording Tests" article for details.


     


    I guess TestComplete will record something like this:




    getid = meterLink.dlgMeterName.btnOK;


    getid.Click();