Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »


1 - Introduction

Waiting commands permits to wait the display or the disappearance of an element. It is useful when you change view, the load of a new page for example.

2 - List of waiting commands

Wait Object

Command

Example

Description

waitIdle

Waits for device idle. Only use in specific cases for web view refresh issues.

COMPATIBILITY : UNIVERSAL

waitUntilText

waitUntilText,[TEXT]

waitUntilText,[TEXT],[TIMEOUT]

Waits for a view element with text specified, to become visible on the screen until a specified timeout. If it is not found, an error is thrown.

CASE-INSENSITIVE DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilDesc

waitUntilDesc,[DESC]

waitUntilDesc,[DESC],[TIMEOUT]

Waits for a view element with content-desc specified, to become visible on the screen until a specified timeout. If it is not found, an error is thrown.

CASE-INSENSITIVE DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilTextBeforeClick

  • waitUntilTextBeforeClick,[TEXT] = waitUntilTextBeforeClick,[TEXT],false

Waits for a view element with text specified, to become visible on the screen and then clicks on it. If false, it waits 10 second max before the error thrown. If true, it waits 2 seconds max.

DEFAULT BOOLEAN : FALSE OPTIONAL BOOLEAN COMPATIBILITY : UNIVERSAL

waitUntilDescBeforeClick

  • waitUntilDescBeforeClick,[DESC] = waitUntilDescBeforeClick,[DESC],false

Waits for a view element with content-desc specified, to become visible on the screen and then clicks on it. If false, it waits 10 second max before the error thrown. If true, it waits 2 seconds max.

DEFAULT BOOLEAN : FALSE OPTIONAL BOOLEAN CASE-INSENSITIVE COMPATIBILITY : UNIVERSAL

waitUntilTextExact

waitUntilTextExact,[EXACT-TEXT]

waitUntilTextExact,[EXACT-TEXT],[TIMEOUT]

Waits for a view element, with the exact text selected, to become visible on the screen until a specified timeout. If it is not found, an error is thrown.

CASE-SENSITIVE DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilTextExactBeforeClick

  • waitUntilTextExactBeforeClick,[EXACT-TEXT] = waitUntilTextExactBeforeClick,[EXACT-TEXT],false

Waits for a view element, with the exact text selected, to become visible on the screen and then clicks on it. If false, it waits 10 second max before the error thrown. If true, it waits 2 seconds max.

CASE-SENSITIVE DEFAULT BOOLEAN : FALSE OPTIONAL BOOLEAN COMPATIBILITY : UNIVERSAL

waitUntilDescExact

waitUntilDescExact,[EXACT-DESC]

waitUntilDescExact,[EXACT-DESC],[TIMEOUT]

Waits for a view element, with the exact content-desc selected, to become visible on the screen until a specified timeout. If it is not found, an error is thrown.

CASE-SENSITIVE DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilDescExactBeforeClick

  • waitUntilDescExactBeforeClick,[EXACT-DESC] = waitUntilDescExactBeforeClick,[EXACT-DESC],false

Waits for a view element, with the exact content-desc selected, to become visible on the screen and then clicks on it. If false, it waits 10 second max before the error thrown. If true, it waits 2 seconds max.

CASE-SENSITIVE DEFAULT BOOLEAN : FALSE OPTIONAL BOOLEAN COMPATIBILITY : UNIVERSAL

waitUntilId

waitUntilId,[ID]

waitUntilId,[ID],[TIMEOUT]

Waits for a view element, with the exact id selected, to become visible on the screen until a specified timeout. If is not found, an error is thrown.

DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilIdBeforeClick

  • waitUntilIdBeforeClick,[ID] =waitUntilIdBeforeClick,[ID],false

  • waitUntilIdBeforeClick,[ID],true

Waits for a view element, with the exact id selected, to become visible on the screen and then clicks on it. If false, it waits 10 second max before the error thrown. If true, it waits 2 seconds max.

DEFAULT BOOLEAN : FALSE OPTIONAL BOOLEAN COMPATIBILITY : UNIVERSAL

waitUntilGoneId

waitUntilGoneId,[ID]

waitUntilGoneId,[ID],[TIMEOUT]

Waits until there is no view element, with the exact id selected, visible on the screen until a specified timeout. If it is still found, an error is thrown.

DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilGoneText

waitUntilGoneText,[TEXT]

waitUntilGoneText,[TEXT],[TIMEOUT]

Waits until there is no view element, with text selected, visible on the screen until a specified timeout. If it is still found, an error is thrown.

CASE-INSENSITIVE DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilGoneTextExact

waitUntilGoneTextExact,[EXACT-TEXT]

waitUntilGoneTextExact,[EXACT-TEXT],[TIMEOUT]

Waits until there is no view element, with the exact text selected, visible on the screen until a specified timeout. If it is still found, an error is thrown.

CASE-SENSITIVE DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilGoneDesc

waitUntilGoneDesc,[DESC]

waitUntilGoneDesc,[DESC],[TIMEOUT]

Waits until there is no view element, with content-desc selected, visible on the screen until a specified timeout. If it is still found, an error is thrown.

CASE-INSENSITIVE DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilGoneDescExact

waitUntilGoneDescExact,[EXACT-DESC]

waitUntilGoneDescExact,[EXACT-DESC],[TIMEOUT]

Waits until there is no view element, with content-desc selected, visible on the screen until a specified timeout. If it is still found, an error is thrown.

CASE-SENSITIVE DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilGoneClass

waitUntilGoneClass,[CLASS]

waitUntilGoneClass,[CLASS],[TIMEOUT]

Waits until there is no view element, with class selected, visible on the screen until a specified timeout. If it is still found, an error is thrown.

DEFAULT TIMEOUT: 30000 OPTIONAL TIMEOUT COMPATIBILITY : UNIVERSAL

waitUntilWindowUpdate

waitUntilWindowUpdate,[PACKAGE-NAME]

waitUntilWindowUpdate,null

Waits for a window content update event to occur. The specified window package name can be null. If null, a window update from any front-end window will end the wait.

COMPATIBILITY : UNIVERSAL

3 - Use case

Use case 1 : wait the display of an element to click on it

Sometimes there are items that are only present on the first display of a screen. This can be a problem when several tests are run on the same application.

We therefore recommend the use of the following commands: WaitUntilBeforeClick commands

  • WaitUntilByTextBeforeClick

  • WaitUntilByDescBeforeClick

  • WaitUntilByTextExactBeforeClick

  • WaitUntilByIdBeforeClick

The second parameter of these methods is an optional Boolean which, if set to true, prevents the test from failing on this instruction even if it's false. The default value of this parameter is false.

This test will fail if "OK" is not found: waitUntilByTextBeforeClick,OK

This test continues on the next instruction if "OK" is not found: waitUntilByTextBeforeClick,OK,true

Use case 2 : wait the disappearance of an element

It is possible that the element expected in the display is also present in the page before loading. It is possible to wait for a view to disappear using waitUntilGone.

  • No labels