fbpx

Method NotExist

Checks/Waits for the object disappears in the AUT

Usage

Function NotExist( 
        Long MsTimeOut [Optional],
        Boolean Report [Optional]
)

Parameters

MsTimeOut (optional)

Type: Long

Default Value: Global timeout value (from ZAPTEST Options)

Optional timeout value in milliseconds

Report (optional)

Type: Boolean

Default Value: True

Generate report for this step

Returns

True if the object doesn’t exist or has disappeared during timeout; otherwise false

Example

VBScript

If Application("Demo").View("DemoView").Object("DemoObject").NotExist() Then
    ' Success, move on. Wait until second object disappears, but disable report generation and set timeout
    Application("Demo").View("DemoView").Object("DemoObject2").NotExist 15000, false
Else
    ' Generate error report
    Application("Demo").CustomReport false, "DemoObject still exists on the view", "Test failed"
End If

JavaScript

if (Application("Demo").View("DemoView").Object("DemoObject").NotExist()) {
    // Success, move on. Wait until second object disappears, but disable report generation and set timeout
    Application("Demo").View("DemoView").Object("DemoObject2").NotExist(15000, false);
} else {
    // Generate error report
    Application("Demo").CustomReport(false, "DemoObject still exists on the view", "Test failed");
}

Documentation Categories

ZAPTEST

FARM

LOAD

Virtual Expert

ZAPTEST

ZAPTEST Logo