Join Wintertainment 2021 to share your stories, have fun, earn community badges, and more!

KeywordTest Object

Applies to TestComplete 15.10, last modified on December 01, 2021

Description

The KeywordTest object provides a scripting interface to keyword tests added to the Keyword Tests collection of your TestComplete project:

The Keyword Tests collection and keyword tests

To get the KeywordTest object in tests, use the following syntax:

KeywordTests.KeywordTest_Name

The KeywordTest object has properties you can use to access its variables and parameters, and methods you can use to run your test.

Members

Example

The code below demonstrates how you can run a keyword test from your script.

JavaScript, JScript

var KeywordTestObj = KeywordTests.Keyword_Driven_Test_Name.Run();

Python

KeywordTestObj = KeywordTests.Keyword_Driven_Test_Name.Run()

VBScript

Set KeywordTestObj = KeywordTests.Keyword_Driven_Test_Name.Run()

DelphiScript

var
  KeywordTestObj : OleVariant;
begin
  KeywordTestObj := KeywordTests.Keyword_Driven_Test_Name.Run;
end;

C++Script, C#Script

var KeywordTestObj = KeywordTests["Keyword_Driven_Test_Name"]["Run"]();

See Also

Keyword Tests
Keyword Tests
Running Keyword Tests
KeywordTests Object

Highlight search results