SetLastError Statement
Description
Inserts a VBScript error into the test script.
Syntax
SetLastError(Error)
Argument | Type | Description |
---|---|---|
Error | Integer | The error. |

The following example uses the SetLastError function to place the "Out of memory" error into the test script. For a list of VBScript errors, see the online Microsoft VBScript Language Reference.
Browser("Advantage Shopping").Page("Advantage Shopping").WebCheckBox("remember_me").Set "ON"
SetLastError(7)
Browser("Advantage Shopping_2").Page("Advantage Shopping").Link("UserMenu").Click
See also: