This functionality is supported only if you are using the Open Agent.
Mark an existing test method in a script as a keyword to reuse the method in keyword-driven tests.
You can now use the test method as a keyword in a keyword-driven test.
Examples
To mark the test method
TestLogin as a new keyword with the name
Login, type the following before the start of the test method:
keyword TestLogin() alias "Login"
To mark the test method
TestLogin as a new keyword with the name
Login and with the two input parameters
UserName and
PassWord, type the following:
keyword TestLogin(string UserName, string PassWord) alias "Login" keyworddescription "Logs in with the given name and password."
... // method implementation
Note: If you are viewing this help topic in PDF format, this code sample might include line-breaks which are not allowed in scripts.
To use this code sample in a script, remove these line-breaks.