Forum Discussion

Mr_Bro's avatar
Mr_Bro
Champion Level 0
5 years ago
Solved

Test Item

Hi Team,

 

I am trying to Check or Uncheck the Project Test Item using Code.

Can any one tell me ow to do it.

  • sonya_m's avatar
    sonya_m
    5 years ago

    Hi Mr_Bro , TestComplete allows checking if a test item is enabled and, therefore, executed when the project is run. Read more about this property here.

     

    tristaanogre is correct – there's no way to change this option programmatically. If you could let us know what you are trying to achieve, we might provide you with another approach.

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    You can't.  A Test Item is what determines whether or not something is running.  You can't "check or uncheck" it as part of code because it is already potentially running.

     

    May I ask what you're trying to achieve?  Perhaps there's a different way.

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Hi Mr_Bro , TestComplete allows checking if a test item is enabled and, therefore, executed when the project is run. Read more about this property here.

       

      tristaanogre is correct – there's no way to change this option programmatically. If you could let us know what you are trying to achieve, we might provide you with another approach.