Folder Salesforce

The folder Salesforce in Standard modules > TBox XEngines > Html contains the Module SfWaitForBusyIndicator.

The Module SfWaitForBusyIndicator can pause test execution while a Salesforce default or custom busy indicator is visible on the screen. Test execution continues after the busy indicator disappears. This ensures that your application has loaded all of its controls before test execution resumes and all pending operations with busy indicators are complete.

It has the following ModuleAttributes:

ModuleAttribute

Description

CssClasses

This ModuleAttribute is optional.

CSS class is used to identify the waiting element. SfWaitForBusyIndicator waits until the element specified in CssClass disappears.

If the busy indicator on Salesforce uses custom CSS classes, enter the name of your CSS class. For example, .customBusyIndicator.

If your busy indicator uses multiple CSS classes, separate them with a comma. For example, .customBusyIndicatorCircle, .customBusyIndicatorLocal.

If you specify a CSS class, Tosca searches for the default CSS classes and custom CSS classes.

Timeout

This ModuleAttribute is optional.

Defines the timeout for SfWaitForBusyIndicator in milliseconds. The default values is 30000, that is 30 seconds.

If you don't enter a timeout value, Tosca waits for the time you defined in the setting Synchronization Timeout during WaitOn.

If you haven't defined a value in Synchronization Timeout during WaitOn, the default value of Timeout is considered.

ContinueOnFailure

This ModuleAttribute is optional.

If set to True or empty, test step is successful and test execution continues in case of timeout or any other failure.

If set to False, test execution fails after the timeout value exceeds.

In this example, you want to use multiple custom CSS classes .customBusyIndicator_1, .customBusyIndicator_2. To do so, you perform the following actions:

  • For the CssClasses ModuleAttribute, you enter .customBusyIndicator_1, .customBusyIndicator_2 into the Value field.

  • For the Timeout ModuleAttribute, you set the timeout to 60000 into the Value field. In this case, the test execution waits for 60 seconds.

  • For the ContinueOnFailure ModuleAttribute, you enter False in the Value field.

SfWaitForBusyIndicator Module in a TestCase