Description
This object provides a scripting interface to a feature file of your TestComplete project. To obtain the object, you use code like this –
JavaScript
let feature = Features.Item(0)
Python
feature = Features.Item[0]
VBScript
Set feature = Features.Item(0)
DelphiScript
DelphiScript does not support BDD.
C++Script, C#Script
var feature = Features["Item"](0)
Members
The object has the following methods and properties:
Member | Description |
---|---|
Description |
A string property that returns the feature description, that is, all the lines of the description, except for the first line that follows the The property value includes the leading and trailing spaces that the description line might have. |
Name |
A string property that returns the first line of the feature description (the line after the The property value does not contain the leading and trailing spaces that the first line might have. |
Run() |
A method that runs all the scenarios defined in the feature file. The method runs scenarios in their order in the feature file. The run is synchronous, that is, it does not exit until all the scenarios run or fail. The method has no return value. |
Scenarios |
A property that returns a |
Tags |
A property that returns a |
Example
For examples of using Feature
objects in scripts, see the following topics:
See Also
Behavior-Driven Development (BDD) With TestComplete
Scripting