studio
latest
false
UiPath logo, featuring letters U and I in white

Studio User Guide

Last updated Dec 17, 2024

Package-file Templates

Test with timeout

The Test With Timeout template is available only with the Testing activity package, version 22.10 or higher. Choose Test With Timeout when you create a test case if you want to use a timeout or to take screenshots when a verification fails.

The template is configured to throw a time-based exception, taking a screenshot of the failure that occurred in your workflow.

Note:
  • If you set the takeScreenshotOnException Boolean variable to false make sure to modify the Timeout Message property of the TimeoutScope activity.
  • You can modify the timeout in the duration variable. The default is set to five (5) minutes.
  • You can keep screenshots on your machine by configuring Testing Project Settings.

XBrowser Test Template

If you want to test the same test data on multiple browsers you can choose to create a test case based on an XBrowser Test Template. This template allows you to test the same web application on multiple browsers, using a single test case. The template works by automatically creating a test data file that holds all the browser types that you want to run the test case on, and then using that data with the Set Runtime Browser activity. By default, the first browser type is Chrome.

Prerequisites

The XBrowser Test Template works only with versions higher than 24.10.0 of Testing.Activities and UIAutomation.Activities.

If you install the appropriate version of Testing.Activities but have a lower version of UIAutomation.Activities, then you won't be able to use the template, until you update the package.

How the template works

The template works by creating a test data file of type json that is named XBrowserTemplateDataVariation. The test data file is populated with a Browser parameter that accepts, by default, the following browser types, depending on the Studio project type:
  • Windows projects: Chrome, Firefox, and Edge.
  • Cross-platform projects: Chrome, Safari, and Edge.
The template automatically creates a corresponding argument for the test data file, named Browser.
Figure 1. A test case that uses the XBrowser Test Template, displaying the test data variation file and the Browser argument

Before the test case steps, the first activity is Set Runtime Browser. The previous Browser argument is placed in the Browser type property of this activity, so at runtime it switches between the browser types declared in the test data json file.

You can further configure the test data file with other browser types, or configure the Set Runtime Browser activity.

Figure 2. Editing one of the browser types in the test data JSON file

  • Test with timeout
  • XBrowser Test Template
  • Prerequisites
  • How the template works

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.