One of the easiest ways to organise a large script on Browser Automation studio is via “Functions”. This way you can separate different stages of a script. For instance, if you created an account management tool for Instagram, you could automate the login, then check if the account is alive, then upload an image from a folder all in separate functions.
In the main section of the BAS recording studio, you can reference those functions in order. This is helpful for keeping everything neat, easy to find for bug fixes, AND if you want to repeat an action several times in one script, you don’t have to copy the code several times. Which will become a nightmare if there’s a website update, since you’d have to update a script many times instead of once.
This is how to create functions and reference them
Now you’ll see this newly created function appear at the bottom. Every action you record here will be saved to that function.
If you click function name at the bottom, it will bring up the list of all your other created functions
You will now see the function in your “main” script section. When you click the run button, it will play everything in the main section. If you have multiple call functions i.e. Introduction and Function Name from the image below. It will execute the actions in Introduction, then everything in FunctionName.
Your article is the most detailed article I have found taught on the web. Thank you.