Description
This object provides a scripting interface to scenarios defined in a BDD feature file in your test project.
To obtain this object, you use a statement like this –
JavaScript
let Scenarios = Features.Item(0).Scenarios;
Python
Scenarios = Features.Item[0].Scenarios
VBScript
Set Scenarios = Features.Item(0).Scenarios
DelphiScript
// DelphiScript does not support BDD.
C++Script, C#Script
var Scenarios = Features["Item"](0)["Scenarios"]
Members
The object has the following properties:
Member | Description |
---|---|
Count |
Returns the number of scenarios in a feature file. |
Item(Index) |
Returns a Index is a zero-based index of the desired scenario in the scenario collection of the feature file. |
Example
For an example of using the Scenarios
object, see examples in the following topics:
See Also
Behavior-Driven Development (BDD) With TestComplete
Scripting