Forum Discussion

RUDOLF_BOTHMA's avatar
RUDOLF_BOTHMA
Community Hero
6 years ago
Solved

Output a KeyWord Test name inside the OnStop event

I'm just looking for a simple way of being able to log when a KWT has been started when being called from another KWT rather tahn from the Project.  As explanation:

 

function GeneralEvents_OnStartTest(Sender)
{
// this works if I'm running the project
  Log.Message("Start " + Project.TestItems.Current.Name); 
  //sender is undefined if I ran the KWT myself e.g. a KWT calls another KWT
  //What I want to do is log every time a keyword test gets started e.g
  Log.Message("Start " + [The KWT that just started]);
}

I just need a way inside here to find out what KWT just started.  Same goes for stop event as well I guess.  Any thoughts/insights ?

 

3 Replies