Recovery Object
Description
Enables you to control the recovery scenario mechanism programmatically during the run session. The recovery scenario mechanism enables you to instruct UFT One to recover from unexpected events and errors that occur in your testing environment during a run session.
For more details on the recovery scenario mechanism, see the Micro Focus UFT One User Guide.
Methods and Properties
![]() | Explicitly activates the recovery scenario mechanism at a specific point in the run. |
![]() | Returns the number of recovery scenarios associated with the current test. |
![]() | Retrieves or sets the status of the recovery scenario mechanism for the current test. |
![]() | Retrieves the name and source file of a recovery scenario, according to the specified position in the list of recovery scenarios associated with the test. |
![]() | Returns the index position of a recovery scenario in the list of recovery scenarios associated with the test, according to the specified name and source file. |
![]() | Returns the status of a recovery scenario (True = enabled or False = disabled), according to the specified index position in the list of recovery scenarios associated with the test. |
![]() | Enables or disables the specified recovery scenario, according to its index position in the list of recovery scenarios associated with the test. |
Activate Method
Description
Explicitly activates the recovery scenario mechanism at a specific point in the run.
Note:
The Activate method only works if the recovery mechanism is enabled, and only activates those recovery scenarios that are currently enabled.
If the recovery mechanism is currently disabled, the Activate method does not activate any recovery scenarios. You can use the Recovery object's Enabled property to change the status of the recovery mechanism.
The Activate method works only when the scenario's trigger event is Application Crash and the Recovery Operation is either Keyboard or Mouse operation or Close application process.
Syntax
Recovery.Activate
Count Property
Description
Returns the number of recovery scenarios associated with the current test.
Syntax
Recovery.Count
Return Value
Number
Enabled Property
Description
Recovery default property. Retrieves or sets the status of the recovery scenario mechanism for the current test.
Syntax
To retrieve the recovery scenario mechanism status:
Recovery.Enabled
or
Recovery
To set the recovery scenario mechanism status:
Recovery.Enabled=Status
or
Recovery=Status
Argument | Type | Description |
---|---|---|
Status | Boolean | The status of the specified scenario (True = enabled or False = disabled). |
GetScenarioName Method
Description
Retrieves the name and source file of a recovery scenario, according to the specified position in the list of recovery scenarios associated with the test.
Syntax
Recovery.GetScenarioName Position, out_ScenarioFile, out_ScenarioName
Argument | Type | Description |
---|---|---|
Position | Number | The index position of the recovery scenario in the list. Index position values begin with 1. |
out_ScenarioFile | String | Variable that stores the retrieved name of the recovery scenario. |
out_ScenarioName | String | Variable that stores the retrieved source file path of the recovery scenario. |
GetScenarioPosition Method
Description
Returns the index position of a recovery scenario in the list of recovery scenarios associated with the test, according to the specified name and source file.
Syntax
Recovery.GetScenarioPosition (ScenarioFile, ScenarioName)
Argument | Type | Description |
---|---|---|
ScenarioFile | String | The source file path of the recovery scenario. |
ScenarioName | String | The name of the recovery scenario. |
Return Value
Number
GetScenarioStatus Method
Description
Returns the status of a recovery scenario (True = enabled or False = disabled), according to the specified index position in the list of recovery scenarios associated with the test.
Syntax
Recovery.GetScenarioStatus Position
Argument | Type | Description |
---|---|---|
Position | Number | The index position of the recovery scenario in the list. Index position values begin with 1. |
Return Value
Boolean
SetScenarioStatus Method
Description
Enables or disables the specified recovery scenario, according to its index position in the list of recovery scenarios associated with the test.
Syntax
Recovery.SetScenarioStatus Position, Status
Argument | Type | Description |
---|---|---|
Position | Number | The index position of the recovery scenario in the list. Index position values begin with 1. |
Status | Boolean | The status to set for the specified scenario (True = enabled or False = disabled). |
See also:
- Crypt Object
- DataTable Object
- Description Object
- DeviceReplay Object
- DotNetFactory Object
- DTParameter Object
- DTSheet Object
- Environment Object
- Extern Object
- Parameter Object
- JSON Object
- JsonUtil Object
- MercuryTimers Object (Collection)
- MercuryTimer Object
- NV Object
- OptionalStep Object
- ParallelUtil Object
- LocalParameter Object
- PasswordUtil Object
- PathFinder Object
- PDFUtil Object
- Properties Object (Collection)
- QCUtil Object
- RandomNumber Object
- Recovery Object
- Remote Connection Object
- Reporter Object
- RepositoriesCollection Object
- Repository Object
- Services Object
- Setting Object
- SystemMonitor Object
- TestArgs Object
- TextUtil Object
- UIAutomation Object
- VisualRelation Object
- VisualRelations Object
- VisualRelationsCollection Object
- WebUtil Object
- XMLUtil Object