This object provides a scripting interface to a BDD scenario defined in your TestComplete project. To obtain the object, you use code like this –
let scenario = Features.Item(0).Scenarios.Item(0)
scenario = Features.Item.Scenarios.Item
Set scenario = Features.Item(0).Scenarios.Item(0)
// DelphiScript does not support BDD.
var scenario = Features["Item"](0)["Scenarios"]["Item"](0)
The object has the following methods and properties:
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.
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.
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.
For examples of using
Scenario objects in scripts, see the following topics: