synchronization, wait, exist, check, checks, scriptless, script-less, scripted, step, view, stepview

Method Exist

Checks if the object exists in the AUT

Watch this video to learn how to use this method

Have a problem with playback?

Usage

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

Step

ZAP Object step

Exist

1500

true

MsTimeOut

Report

Parameters

MsTimeOut (optional)

Type: Long

Default Value: Global timeout value (from ZAPTEST Options)

How long to look for object before failing in milliseconds

Report (optional)

Type: Boolean

Default Value: True

Generate report for this step

Returns

True if object exist; otherwise, false

Example

VBScript

If Application("Demo").View("DemoView").Object("DemoObject").Exist Then
    ' Success, move on. Search for other object, but disable report generation and set time out
    Application("Demo").View("DemoView").Object("DemoObject2").Exist 10000, false
    ' If object will not found test execution will be continued
Else
    ' Generate error report
    Application("Demo").CustomReport false, "Cannot find the DemoObject", "Test failed"
End If

JavaScript

if (Application("Demo").View("DemoView").Object("DemoObject").Exist()) {
    // Success, move on. Search for other object, but disable report generation and set time out
    Application("Demo").View("DemoView").Object("DemoObject2").Exist(10000, false);
    // If object will not found test execution will be continued
} else {
    // Generate error report
    Application("Demo").CustomReport(false, "Cannot find the DemoObject", "Test failed");
}

Comment

Fill all parameters

Script-Less next step

Step

ZAP Object step

Exist

1500

true

Script-Less next step

Comment

First parameter is optional. Leave it empty

Script-Less next step

Step

ZAP Object step

Exist

true

Contact Us

1425 Market Blvd Suite 530-230

Roswell, GA 30076, USA

(800) 795-3552