Understanding Global scenario and Play Script Section action

Questions

  1. What is a Global Scenario and how do you use it?
  2. How do you add a section to a global scenario?
  3. How do you play or call on a section of a global scenario?
  4. How do you add a call to a global scenario section while recording?

Answers

What is a global scenario and how do you use it?

A global scenario is a scenario where you can save scenario sections (an action or actions) that will be used in multiple other scenarios. The advantage of having a global scenario is that you can make changes to it and those changes will affect all the scenarios that call it.

For example, if you have multiple scenarios that include an action to click on the same icon in your application, you can add the steps to click on the icon to a global scenario as a scenario section. When you create the multiple scenarios that require this action, you can call on the scenario section from the global scenario. In the future if the icon changes, you will only need to update the image of the icon in the global scenario, not all the scenarios that call on it.

You will only be able to call on a scenario section from a global scenario. You can designate a scenario as "Global" in the scenario's Properties.

Understanding Global scenario and Play Script Section action (115004329873)_Screenshot_1

If you are creating a new scenario, you can select "Global Scenario" from the Type menu.

Understanding Global scenario and Play Script Section action (115004329873)_image

How do you add a section to a global scenario?

To add a scenario section to a global scenario, add the actions to the global scenario as you would any scenario. A scenario section should contain a main (parent) action and any child action(s). After you've added the action(s), name the section by going to the properties of the main action (the most left action) for the section, and enter the name into the "Scenario Section" field.

Understanding Global scenario and Play Script Section action (115004329873)_Screenshot_4

You can also add sections to a global scenario from other scenarios by clicking on the "Move To Global Scenario" option in the edit menu of an action.

Understanding Global scenario and Play Script Section action (115004329873)_Screenshot_2

Select the global scenario from the list. If you specify a scenario name that does not exist, ScenarioBuilder will create a global scenario with that name. Also, enter a name for your scenario section.

Understanding Global scenario and Play Script Section action (115004329873)_image - 1

How do you play or call on a section of a global scenario?

In order to Play a Global Scenario (usually a section in the scenario), you need to add an action in ScenarioBuilder called "Play Script Section" to call a section of a global scenario. Select the global scenario  in the "Script Name" property. Then select the scenario section in the "Play Section" property which will be a drop down list of all the sections of the specified global scenario.

Understanding Global scenario and Play Script Section action (115004329873)_Screenshot_3

How do you add a call to a global scenario section while recording?

You can add a call to a global scenario section while recording your scenario by clicking on the "Add a subscenario" button in the recorder extended menu. You will be able to select the section that you want to call from a drop down menu. The scenario type has to be "Global" in order for the Scenario Sections drop down menu to be active.

Understanding Global scenario and Play Script Section action (115004329873)_Screenshot_5