Feature availability: accelQ version 3.0 and above
When you define an Action, you can mark multiple contexts as possible destinations. This comes in handy when an action performed on the application could lead to different pages depending on various conditions. It eliminates the need to duplicate action logic in these situations.
Example 1: Left Nav menu selection
Consider the left-nav menu system below. There are a large number of menu and sub-menu items and your test logic may require you to navigate to different menus. A test step (or Action) to select a specific menu item involves hovering on the first level menu and then clicking on the sub-menu item. You will end up creating numerous Actions to cover all possible menu clicks you need. This can be elegantly setup as a reusable Action using the concept of Multiple Destinations.
Consider the Action logic below, where the menu name and sub-menu name are passed as parameters to the Action (Left Nav text and Sub Menu Text). Now, this logic can pretty much hover on any given menu and click on the given sub-menu. However, the destination for each menu/sub-menu combination is different. You can take care of this by setting up the Action to use multiple destinations and thereby allowing just a single Action for entire suite of navigation requirements.
Note: Line #1 and #3 above update the Menu and Sub-Menu element's text to the required text, so the Action becomes usable across several values for the menu-text, sub-menu-text parameters.
Example 2: Action behavior changing based on Business Rules
For example, let's consider an e-commerce site, where you have an Action, "Provide payment info and confirm order". When the user enters payment information, the application may either land in Purchase Confirmation Page or Authentication Page depending on the business rules for different forms of payment.
You can address this situation by defining one action, with 2 destinations as below.
Example 3: An Action to cover Negative and Positive inputs
Consider a requirement where you may need to use Login an an Action both for positive testing and negative testing (by providing invalid username/password). Now the logic to perform Login is the same regardless if you provide valid input or invalid input. You can define one Login Action to achieve both this using Multiple Destination concept.