Referencing the Keyword Test
Hello,
Apologies, I'm fairly new to Test Complete. I'm having an issue attempting to reference the Keyword Test that my function is being called from, thus not being able to access it's variables or anything else without specifying the Keyword Test.
Rather than having to specify each time, I thought there must be a way to reference the Keyword Test that a function is being called from so I can access other properties such as Variables or Parameters. Is this possible to achieve? I have tried various things (Project.TestItems.Current.ElementToBeRun.CaptionMarked, Current.Name and so on) and they just simply return null or undefined.
It was for adding an indeterminate level of variables based on what was given as the parameter and to use a for loop to list through each one and perform an action based on this. It's pretty niche to this situation, so apologies for the confusion!
I did manage to get it working, I'd just stupidly not added my test as a test item in the test execution plan, hence why it was returning as null.So my solution was using Project.TestItems.Current.Name and adding the Keyword Test to the execution plan and running it from there to return the current Keyword Test Name.
Thank you for your reply :)