Description
This object provides a scripting interface to a BDD scenario defined in your TestComplete project. To obtain the object, you use code like this –
JavaScript
let scenario = Features.Item(0).Scenarios.Item(0)
Python
scenario = Features.Item[0].Scenarios.Item[0]
VBScript
Set scenario = Features.Item(0).Scenarios.Item(0)
DelphiScript
// DelphiScript does not support BDD.
C++Script, C#Script
var scenario = Features["Item"](0)["Scenarios"]["Item"](0)
Members
The object has the following methods and properties:
Member | Description |
---|---|
Description |
A string property that returns the scenario description, that is, all the lines of the description except for the first line that follows the The property value includes leading and trailing spaces that description lines might have. |
Name |
A string property that returns the first line of the scenario description, the text after the This line identifies the scenario in the test log and in TestComplete’s panels and dialogs. The property value doesn’t include leading and trailing spaces. |
Run() |
A method that runs the scenario. The method does not return any value. Also, the method does not return the execution control until the scenario run is over. |
Tags |
A property that returns a |
Example
For examples of using Scenario
objects in scripts, see the following topics:
See Also
Behavior-Driven Development (BDD) With TestComplete
Scripting