Happy to see you through this article. Actions!.. The name itself explain what it's going to do. Well, Actions are block of script that going to perform a specific action or operation in a test. We can rather say an Action is a function but actions have it's own object repository and DataTable sheet. A test may contain more than one action. An automation tester can decide what are all the events should be put in a action. Even though it's not complex, this single post is not enough to explain everything about Actions. Let me try to furnish as much as details I could accomodate in this post.
There are two types of Actions in common.
1. Reusable Action.
2. Non- Reusable Action.
Reusable Action:
These actions can be reused in any place in the test. We can call the reusable action from another action. To mark an action as reusable, select the 'Reusable action' checkbox in the action properties. If we uncheck 'Reusable action' Checkbox it will become Non-Reusable action.
Non-Reusable Action:
These actions can not be reused. We cannot call a non-reusable action from another action.
Call to New Action...:
Through this way we can create a new action. Also, It will create a call to new action from the action it's being created. We can either select "Call to New Action..." option from toolbar or from Insert menu. This will open the 'Insert Call to New Action' dialog. If we select 'Reusable Action' checkbox then the new action going to be created will be a resuable action.
There are two more options to choose where the call for the new action to be inserted.
After the current step - Call to the new action will be created after the current step in the current action. So while executing the test, New Action will execute after current step.
At the end of the test - Call to the new action will bve created at the end of the test. So New action will be executed after the execution of all the existing action.
Call to Copy of Action...:
We can use this option when we want to create copy of an action (The copied action present in the current test directory). We can copy the action either from the same test or from another test. This option will create a copy of the action in the current test. Any changes in the copied action will not affect the original action.
When selecting the 'Call to Copy Action..' option, "Select Action" dialog will be opened. By default, all the actions associated with the current test will be listed.
If we select "Edit new action properties" check box in 'Select Action' dialog, Action properties dialog will be opened on clicking the OK button.
There are two more options to choose where the call for the copied action to be inserted.
After the current step - Call to the copied action will be created after the current step in the current action. So while executing the test, copied Action will execute after current step.
At the end of the test - Call to the copied action will bve created at the end of the test. So copied action will be executed after the execution of all the existing action.
Call to Existing Action...:
This option will just create a call to the existing action without copying it. If the original action is modified, it will affect all the places where the action is called. When selecting the 'Call to Existing Action..' option, "Select Action" dialog will be opened. By default, all the actions associated with the current test will be listed.
If you are creating a call to an Action from another test, it will be called as "External Actions". Actually, these External actions are read-only in the calling test. But you can use the local editable copy of data table for these external actions.
No comments:
Post a Comment