Forum Discussion

svishwakarma's avatar
svishwakarma
Occasional Contributor
4 years ago
Solved

How to set pre-condition for TestComplete

I want to clear cache before every test script I want to set pre condition for test script.

 

Please suggest a solution for same issue.

 

Thanks in advance.

 

Sandip

6 Replies

      • svishwakarma's avatar
        svishwakarma
        Occasional Contributor

        Thanks all of you.

        I got solution, I set the property in the chrome browser whenever browser opens then cache should be clear. 

        In this way I got solution.

         

        Thanks 

        Sandip

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    You can add steps to your test to do that the same way you do it manually. The easiest way would be to record a test to do what you want.  If you are testing on more than one browser, you'll need to make your final test conditional on the specific browser since the steps will be different.

     

     

  • svishwakarma's avatar
    svishwakarma
    Occasional Contributor

    I recorded cache clear steps when I run and recorded script pass but browser still have cache.

     

    anyone have any other solution? please share.

    Thanks in advance

    Sandip

    • Marsha_R's avatar
      Marsha_R
      Champion Level 3

      After you recorded the test, did you change any screen coordinates in the test to actual object names?  This could be causing the clearing part not to be working as you expect.

       

      If that's not the case, I would use the Debug feature in TC to step through that part of your test and make sure it's doing what you meant it to do.