Testim Documentation

Welcome to the Testim documentation. You'll find comprehensive guides to help you get started quickly, example code snippets, and tips for being more productive. You will also find details about advanced features that allow you to customize Testim to fit your environment or special testing conditions. Don't worry, we'll support you if you get stuck. Let's jump right in!

Guides    Changelog

Group context

Learn how to maximize reuse by assigning entire groups to different elements of the page and across pages

The Group Context feature enables you to run groups of steps on other, slightly different, elements (contexts), without the need to manually reconfigure the steps. When setting a context for a group step, the locators in its steps are automatically and dynamically changed to fit the new context.
For example, if you created a group of steps for booking a reservation to Madan and you want to run that group for booking a reservation to Shenji, instead of manually changing the step details, Group Context will automatically make the appropriate adjustments for you.


For background information about Groups and Shared Groups, see Groups.

Examples of when you may want to use this feature include:

  • Repeating elements – when you have similar elements repeating in the page and want to execute the same steps on each of them.
  • Table rows – when you want to execute the same steps on each row in a table.
  • Tabs or frames – when you want to use a group of steps, which were recorded on one tab, in another tab.

Setting a context for a group

The following procedure assumes that you have already created a shared group step that you would like to reuse in a new context. The procedure for creating a group is described here.
To set a context for a group:

  1. Click the “+” button > Groups Tab.
  1. Select the desired group from the list of existing group steps.
  2. Hover over the group step you just added and click on the Show Properties () icon.

The Properties panel opens on the right-hand side.

  1. Click the down arrow next to Context, and select Custom.
  1. If your AUT (application under test) browser is not currently open to the relevant page, you will be prompted with a message to "Open base URL" or "Run test to relevant step". Click on Run test to relevant step. In this case, you will need to click on Custom again once the AUT is ready.
    The AUT browser opens.
  2. In the AUT browser, identify the relevant element (context) you would like your group to run on, and click on it to select it.


By default, when selecting context for a group, the application will be in "Context selection mode". In this mode the repeating elements on the page will be highlighted to help with the selection. To exit this mode and return to the normal selection mode, click Q on your keyboard.

  1. The selected element is shown in the Target element box in the Context section of the Properties panel.

The new context is automatically applied to the group step, with no additional need for you to reassign the step.


Testim automatically identifies which steps in the group should run on the provided context, and which should run outside of it.

Try it yourself

Click here to view a test where a group step has been applied to more than one context. Use the shared group step “book” to create a new booking for a different destination in the app by changing the Context of the group step.

Updated 10 days ago

Group context

Learn how to maximize reuse by assigning entire groups to different elements of the page and across pages

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.