Forum Discussion

babak_o's avatar
babak_o
New Member
11 years ago

Is there a function that returns a boolean on whether an object item is successfully clicked or not?

 Using C#script I'm looking for something like this:

 

var isClicked = MyWindow["MainMenu"]["Click"]("File|Save")//.IsClickedFunction();

if(isClicked)

{

   Log["Message"]("Success Click");

}

else

{

   Log["Message"]("Click Failed");

}

 

Thank You

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor

    There is nothing returned by the Click method.

    If TestComplete fails to click an object an error will be written to the log.

    • TanyaYatskovska's avatar
      TanyaYatskovska
      Icon for Alumni rankAlumni

      Hi Babak,

       

      As a rule, the click inside the application opens a new window, activates some window or objects, etc. Thus, if you want to make sure that the click is performed, you need to check if it brings the expected results.