- What is a Global Scenario and how do you use it?
- How do you add a section to a global scenario?
- How do you play or call on a section of a global scenario?
- How do you add a call to a global scenario section while recording?
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.
If you are creating a new scenario, you can select "Global Scenario" from the Type menu.
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.
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.
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.
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.
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.