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

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

Step

Exist

1500

true

Comment

First parameter is optional. Leave it empty

Step

Exist

true

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227