TABLE OF CONTENTS
1.1 Example 1 - User Authentication Scenario
1. Grouping Steps for Reuse
In programming, the principle of "reuse" involves avoiding repetitive tasks by placing them in methods that can be called whenever needed, rather than copying and pasting the same code multiple times.
This principle applies similarly in automated testing. By grouping steps together into reusable components, you can call a particular custom action (reusable component) in different tests. This helps in reducing the number of steps visible in the script.
1.1 Example 1 - User Authentication Scenario
Consider a scenario where you need to authenticate a user using a custom action. This action includes:
- Enter username
- Enter password
- Enter captcha
- Click submit button
These steps can be grouped together into a custom action (reusable action) named 'Log into the ecommerce website'. This custom action can then be called in the Follow Me and Edit Scenarios features. For more details on usage of custom actions, click here.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article