scottroutesmart's avatar
scottroutesmart
Occasional Contributor
3 years ago
Status:
New Idea

Reference the Current Keyword Test Variables

I have searched the forums and documentation and can't find an easy way to reference the current keyword test variables using the "code" option. Something similar to the aqTestCaseObj.CurrentTestCase function, but would also extend to the parameters and variables contained within it.

KeywordTests.Current.Variables.OldName
or
KeywordTests.this.Variables.OldName

I am basically trying to store a value, then append something to it by referencing that variable. But, if I copy/paste into similar tests, I have to go in and manually edit each reference to the old test, and modify it to the new test name.

So, if my original test contains a reference to a variable in a parameter like this as code...

KeywordTests.TESTNAME1.Variables.OldName + "something"

When I copy it to the new tests I have to edit the test name manually to be:

KeywordTests.TESTNAME2.Variables.OldName + "something"

This is time consuming given all the dialog boxes involved in some places, and also error prone to typos, etc.