Web Recorder Tool in OpenBots Studio
Today we will build an automation in OpenBots Studio using the web recorder tool. You can use a recorder to speed up the automation process by capturing the users actions and translating them into a sequence of commands. Let’s create a new project.
Now we will navigate to the recorder tools tab and select the web element recorder. This will open the web element recorder window. At the start of any recording, it is important to navigate to the target website where the recording should begin. In this case, the automation will start on the eBay homepage. Type the URL and click the go button.
The web element recorder page offers different functionalities like back and forth navigation, refresh, record, save element, and access to the element manager. Let’s start the recording by clicking record. This will open the sequence recorder setting window. Indicate the browser instance name which will be used across all web browser commands to indicate the targeted instance.
Let’s use a unique name to differentiate it from other web-based instances. Select the browser engine type and the default search parameter that all capture elements will employ.
This is used to isolate the target element on the web page. If multiple parameters are selected, the bot will attempt to interact with the element that contains the old parameters. It is important to select a stable parameter to ensure the bot will always find its target. In this case, I will select the X Path.
For this automation, I will search for a monopoly game. Click the search button. I will filter the results by limiting the listing to “Buy It Now”, in new condition, and sort by best match. Let’s click the first search result. And now we will capture the price. In order to do this, we will click the element containing the wanted text. You are able to see the generated X-Path as the elements are being recorded. When the command is generated, we will modify it to get the text instead of clicking it. Press F2 to save the recording and close the recorder.
Three commands have been added to the code window: the create chrome browser, the close browser, and the sequence command. If we click that command, it will open another code window which contains all of the commands generated during the recording.
In this case, all of the commands are element actions pointing to the eBay browser instance. If we open a new command, we will be able to see its action and parameters. In this case, it’s setting the search text to “monopoly game.”
The commands generated can be modified as needed. For example, the search can be dynamic by indicating a variable instead of hard coded text. In between each command, a way for an element to exist action is placed, which ensures that the page has been loaded correctly before performing the next step. Let’s modify the last command generated, which clicks the price text.
Change the element action to get text. Indicate a variable which will hold the extracted text. We can rename the sequence to a name that better describes the actions performed by the group of commands it contains. Click the save button to save the changes made to the sequence. Now let’s add a show message command to display the extracted text.
Verify its correctness before closing the web instance. We are ready to run the automation. Click run. We can see that the price extracted matches the price listed on the website. Now we can dismiss the message to continue the automation.
If you would like to be trained by our developers CLICK HERE and select one of our Citizen Developers Jumpstart programs. If you want individual training select the SOLO Jumpstart and if you want to train your team select the Team Jumpstart.