Forum Discussion

dhirendranaga's avatar
dhirendranaga
Occasional Contributor
7 years ago

set project playback setting using code

Please help in below requirement.

 

- Have a ProjectSuite with 4  projects in TestComplete

- Requirement is

    - to disable the 'stop on error' property for 2nd and 4th projects

    - to enable the  'stop on error' property for 1st and 3rd projects

 

Need help as how to write code/script that does the below

- First read the playback settings for a give project

- Next compare and set accordingly the required setting to required value

  -  In above, set off or on the 'stop on error' playback setting accordingly.

 

5 Replies

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Just as a note, those settings are available within the Project Suite editor in the TestComplete workspace itself.  When you make those changes in the Project Suite, they are saved within the Project Suite.  Once set, you shouldn't need to change them via code.

       

      Think of them as compiler settings when compiling an application.  Once the application is compiled and built out to the EXE, you can't very well go back into that application and change up those things that were applied by the compiler.  In order to make such changes, it would need to be re-compiled.  Once a project has started running, it can be considered to be "compiled" so anything that alters that workflow of the test project are "off limits" at run time.

      • dhirendranaga's avatar
        dhirendranaga
        Occasional Contributor

        Thank you all for the information.

         

        But will be helpful if provisioned to update via code also.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    To add to Robert's reply: the only option at the moment is to programmatically process project suite file before tests start and make required changes to it. Project file is an XML one so it can be processed like any other XML file. Note, that this is not documented approach and internal files format changes with almost any major version of TestComplete.