Skip to Content
Product Information

SAP Intelligent RPA 2.0: Best practices for wait activities

This blog post will show the different activities to perform a wait in an automation and the best practices to use them.

Wait screen

Purpose: Wait for a screen to load.

Technology: Available for all technologies.

Integration: By default, the activity is integrated in all the standard technologies.

Best practices: Useful to be sure the screen is fully loaded before doing any activities especially when the Start Web Page activity is used.

Parameter: The parameter wait_refresh can be set to true to handle the case where the page has changed and the automation needs to wait for a refresh of the page, in order to continue the workflow.

Use example:

In this UI Automation application, we start a web page and then do a Wait Screen on it. We do this to ensure that the automation wait enough time to let the web page start and fully load to start interacting with it.

 

Wait ready

Purpose: Check if the screen is ready. This is a required step before doing action on the screen for a SAPUI5 screen.

Technology: SAPUI5

Integration: This action is not integrated by default, the user need to have the SAPUI5 dependency by adding it manually. Capturing an SAPUI5 screen will add it automatically.

Best practices: If a screen activity follows an activity that involves a backend call (fetching or validating data), this makes the SAPUI5 screen in a busy state. So you should put a Wait screen activity between the two actions so that the second activity can start when the screen goes from the busy to the ready state.

Use example:

In this automation with a SAPUI5 application we do a Wait Ready after we fetch the order status on the page and before another iteration of the loop or in the case that the condition is true, before getting other data on the screen.  The Wait Ready ensure that the SAPUi5 page is ready for a new action, if not the automation will wait. If there is no Wait Ready the automation will tried to access the page and it will possibly create an error.

 

Wait Element

Purpose:  Wait for a screen element to be present and loaded.

Technology: Available for all technologies.

Integration: For all Web activities. It means that if you use the activity Get Element on an element in an application, a Wait Element will be automatically done by the SDK.

Best practices: For UIAutomation, the activity should be use for certain UI elements, by trying and troubleshooting. In some cases, the Must Exist activity can be used in addition to ensure the existence of an element.

Use example:

For this SAP UI5 Automation, we use the Wait Element activity because we open a tab in a page, so it’s not a new page. We want to be sure that the tab and the element on the tab is present so we can do different activities on it, like here a Get Element.

 

Wait close

Purpose: Wait for the screen to be close.

Technology: Available for all technologies.

Integration: By default, the activity is integrated in all the standard technologies.

Best practices: Used if the automation needs to wait for a human to interact by closing the screen.

Use example:

For this example we do a simple automation for the connection on sap Logon. At the end we do a Wait Screen Close to wait for the user to manually close the page and then proceed with the workflow.

 

Activate screen

Purpose: Bring the screen to the front. For the web technology it also bring the tab to the top.

Technology: Available for all technologies.

Integration: By default, the activity is integrated in all the standard technologies.

Best practices: Should be used before an activity on the screen, especially if there is human activity on the agent as the same time as the automation execution

Use example:

In this example, we do an Activate Screen activity after a human interaction to be sure that the screen is targeted.

 

Conclusion

Each wait activity can be specific to a technology or a case. To ensure that your workflow run smoothly,  it is important to know which one is the best for your case.

1 Comment
You must be Logged on to comment or reply to a post.