Runner.CallMethod works pretty well with regards to running Keyword tests. You can do a syntax like:
Runner.CallMethod('KeywordTests.TestName.Run', 'parametervalue');
However, this is a bit ...
Run A KeywordTest by name
HKosova
9 years agoSmartBear Alumni (Retired)
In JavaScript/JScript you can use the bracket syntax to access an object property by name, in this case a keyword test by name:
KeywordTests['TestName'].Run('parametervalue');
UPD: In Python you can use __getprop__:
KeywordTests.__getprop__("TestName").Run("parametervalue")
In VBScript and DelphiScript you can use aqObject.GetPropertyValue -- or just GetPropertyValue() -- as an alternative to "eval":
' VBScript Set test = GetPropertyValue(KeywordTests, "TestName") Call test.Run("parametervalue")
But I agree that KeywordTests.TestByName("TestName") would be nice to have.
Related Content
- 14 years ago