how to Skip Onstart event for particular Testcase in Test Complete 12
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2018
03:50 PM
01-30-2018
03:50 PM
how to Skip Onstart event for particular Testcase in Test Complete 12
Hi,
I have a scenario in which an OnStartEvent I want to Skip it for a particular Test case and then again I need for other Test case
So generally How can I avoid/Skip using Onstart event ?
Thanks in advance for help.
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2018
08:20 PM
01-30-2018
08:20 PM
You can go to project/ Events / general event and click on OnStartTest event and press new button
It will create a function like
function GeneralEvents_OnStartTest(Sender) { }
could be saved where ever you like.
I assume you already have that and you do something in this function.
the trick would be using a if condition....like
if (Project.TestItems.Current.Name == "FirstTestItem") { // Do nothing null; } else { // Do my usual stuff }
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2018
04:48 AM
07-30-2018
04:48 AM
I managed this with:
if (Project.TestItems.Current != null) { //on start test stuff } else { null; }
