top of page

Step 2 - Write first automation script in BotPlay

Updated: Feb 2, 2022


Welcome to the world of codeless web automation testing – the BotPlay Automation.


BotPlay testing bot can automate your web application manual testing and processes without writing a single line of code. It's simple, it's easy, it's portable, and, it's codeless.


Let’s learn how to use BotPlay for web automation testing.



How to automation a sample flow using BotPlay.


[Step 1] - Download, create Bot credentials, and set up the BotPlay app.

In case not done already, follow this link to complete the BotPlay set up first on your machine and resume from step 2 below. Set up BotPlay on your machine for automation testing



[Step 2] - Launch the bot.

Once setup is done, open the BotPlay App by clicking the BotPlay.exe file from the downloaded folder.






[Step 3] - Get familiar with the BotPlay.





Automate a simple use case


Let’s take a simple use case to automate a product check-out functionality on a sample e-commerce website to understand this further.


In this use case, we will automate the following steps –


1. Launch a sample eCommerce website https://demo.opencart.com,
2. Select a product – iPhone,
3. Enter quantity,
4. Add item to the cart, and
5. Check out the product.

[Step 1 - Create a new 'user story', 'test case' & 'automation script']


[Step 2 - Write 'user story']


[Step 3 - Write 'test case']


[Step 4 - Write 'automation script']




[Automate - 1. Launch a sample eCommerce website https://demo.opencart.com]

To launch a browser and open the website or application under test (AUT) as shown in the below screenshot -


On BotPlay, expand the ‘Browser’ section from the left-hand side where you will find options to work on the browser. Select ‘launch website’ instruction. Now go to the ‘automation script’ area and change the URL with the address you want to open, in our case, it is demo.opencart.com




[2. Select a product – iPhone,]

This step is to select an item to checkout, let’s say, an iPhone.


For this, from BotPlay's left-hand navigation plane of the ‘Create bot’ tab expand the ‘Link’ section and select the ‘click by name’ option and replace the ‘ElementName’ with the name of the link on the webpage – that is ‘iPhone’ by copying its text from the website.




[3. Enter quantity]

Now let’s select the quantity and make it ‘10’.

On BotPlay's ‘Create Bot’ tab, open the ‘Textbox’ section and select the option ‘enter value’. This instruction is to enter test data in a text box. Change the ‘TestData’ to ‘20’ and replace the ‘ElementName’ with the name of the quantity textbox by copying its text from the website.




[4. Add item to the cart, and]

The next automation step is to add the selected items to the card.



As ‘Add to Cart’ is a button, on BotPlay's ‘Create Bot’ tab, open the ‘Button’ section and select ‘click by name’ option. Replace the ‘ElementName’ with the name of the button on the webpage – that is ‘Add to Cart’ exactly in the same case as visible on the website.




[5. Check out the product.]

The next step is to check out the item.


Perform similar operations with the check-out link by selecting the 'Link' section from the ‘Create bot’ tab and select ‘click by name’ option and replace the ‘ElementName’ variable with the name of the link on the webpage – that is ‘Checkout’.




[Step 5 – Copy and paste to the 'automation script']

To save the script created select the ‘Save As’ button from the File menu as shown in the below screenshot. Please ensure to save all your scripts under the Bot/automation_scripts folder present inside the BotPlay application folder.





You have successfully created an automated script without even writing a single line of code. Now it is time to run it. :)

[Step 5 – Run the bot ]


Click on the ‘Run Bot’ button to run this script and wait for the bot to perform your automated tasks. You will get a notification when the bot starts running.



Now the automation execution has begun. BotPlay will perform exact same steps we have asked the bot to do. It will launch the browser of choice, open the application under test by entering the website URL you have provided, selects the product, enters the quantity, and checkout.


[Step 5 – Validate the results ] – Once automation is completed and there is no new opening of the browser, navigate to the runs tab to see the results of automation execution.



BotPlay is based on Gauge. Users can refer to the link to understand the format better.


This is BotPlay automation a unique codeless automation testing SaaS platform that lets you automate the testing on web applications without writing and maintaining any code.


With BotPlay anyone can automate. Visit botplayautomation.com to start for free.



Recent Posts

See All
bottom of page