Action Collection in Action
When ‘Action Collection’ type is selected for the action what that means is that it will execute the action steps which are added to its action collection rather than specific script. This powerful feature allows to create another abstract layer to avoid step duplication and make sure test case that uses that action remains readable (more details on how to work in Action Collection screen can be found here). The parameters that are created for this action are used as variables that can be passed as data values to other actions which are in action collection. Bellow are some of the recommended type of actions within actions that can be created.
Examples on how to best utilize this feature:
Using multiple key-worded actions to make a single readable one
We want test case designer to be able to do a search on amazon page by having an action that types in a value and clicks on Go button and we want make sure this action is easy and fast to use.
- Since the only input from user is to specify a text for the search field we have created only one string type parameter ‘search for’.
- We have added two actions that use Selenium code: ‘Send Keys to Element’ (to set the text for Search text field) and ‘Click on Element’ (to click on Go button)
- Using Looking Glass we ID and ID Types that the controls use
- For ‘Text’ parameter I have put the name of the parameter as a variable (a value that will be entered on a test case level)
${ search for }
- Now a test case designer can use this new ‘Search Amazon’ action on a test case level making it instantly readable and without worrying what code is being used to do clicking and text typing and for what attributes
Multiple Actions accomplishing specific objective
Post your comment on this topic.