Ask a Question

How to set pre-condition for TestComplete

SOLVED
svishwakarma
Occasional Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: How to set pre-condition for a testcomplete

Hi Sandip,

 

 I want to set pre condition for test script.

Consider the OnTestStart event- https://support.smartbear.com/testcomplete/docs/reference/events/onstarttest.html.

Does it help?

 

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

6 REPLIES 6
Marsha_R
Community Hero

Re: How to set pre-condition for a testcomplete

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.

 

 

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
svishwakarma
Occasional Contributor

Re: How to set pre-condition for a testcomplete

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
Community Hero

Re: How to set pre-condition for a testcomplete

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.  

Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
AlexKaras
Community Hero

Re: How to set pre-condition for a testcomplete

Hi Sandip,

 

 I want to set pre condition for test script.

Consider the OnTestStart event- https://support.smartbear.com/testcomplete/docs/reference/events/onstarttest.html.

Does it help?

 

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

sonya_m
Community Manager

Re: How to set pre-condition for a testcomplete

Thanks Alex and Marsha!

 

@svishwakarma Do the recent suggestions help?


Sonya Mihaljova
Community and Education Specialist

Join Wintertainment 2021 to share your stories, have fun, earn community badges, and more!
svishwakarma
Occasional Contributor

Re: How to set pre-condition for a testcomplete

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

cancel
Showing results for 
Search instead for 
Did you mean: