Waiting methods


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

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.