Document toolboxDocument toolbox

Effectively Use Wait Modes in Qualitia

Introduction

Starting version v5.2, you can now use two different wait modes when executing test cases in Qualitia. This helps in optimizing the performance and building robust Qualitia test cases.

Wait Modes

Implicit

In this mode, WebDriver waits for certain amount of time for the specific element or object to appear. If element does not appear, it throws an "ElementNotFound" exception. The default time is 10 seconds.

Explicit

In this mode, WebDriver waits for the element or object to appear or obtain certain conditions (Expected Conditions) or the maximum time exceeded before throwing an "ElementNotFound" exception. If the element appears anytime before reaching the maximum time specified by the user, execution continues to further steps.  

In Explicit Wait, you can specify Timeout and Polling Interval. These are the additional capabilities used by WebDriver to optimize the performance when executing test cases. Using these two options, Qualitia gives you provision to control the execution flow specifying time for every specific object to achieve the expected condition before performing further actions.

You can set these capabilities from multiple levels when developing test cases in Qualitia:

  1. Configuration Settings
    You can set Wait Mode (newly added option) as Explicit. This enables you to specify Timeout (seconds) and Polling Interval (milliseconds).
  2. Object Level
    You can specify the timeout and polling interval when adding object into the Qualitia object repository from the Objects screen. These values help when action does not have parameters to provide polling interval and timeouts. 
  3. Using Wait Specific Actions
    Apart from the options mentioned above, you can also use the actions specific to wait for the expected condition of the object and then continue execution. For the complete list of actions, you may refer to the Qualitia action library.

Which values are considered when values are provided at multiple levels?

  • For Suite Executions

When executing test cases, it may happen that timeout and polling interval are given at multiple levels. At such times, values provided from the actions will be considered over the values provided at object level or in the config settings. The following diagram explains which values are considered when capabilities are provided at multiple levels.

Expected condition works only with the Explicit wait mode.

  • For Executions Using Qualitia Offline Package

When executing test cases using Qualitia Offline Package, Qualitia gives you provision to pass the arguments using command line interface as well. You can provide timeout and polling interval using the command line arguments. These command line arguments override the values provided at the object level and the values provided in the action or configuration settings.

Not finding what you need?