Responsive Menu

How to build a web automation using OpenBots Studio

Today, we will be discussing how to build a web automation using OpenBots Studio. This automation will open the Google search page in the Google Chrome browser, perform a basic search for the current Google stock price, and display the extracted price in a text box.

Preparing Your Browser

In order to use the native browser commands that OpenBots Studio offers, you must ensure that the correct extensions are installed for the browser you intend to use.

In the options tab of OpenBots Studio, select the extension manager. This will open a new window that displays the extensions that are available for each browser that OpenBots currently supports. Click the install button next to the extension you wish to install and allow OpenBots Studio to install it for you.

Check that the extension has been installed into your browser. You are now ready to build your automation.

Opening Google Chrome

In OpenBots Studio, search for the Native Browser Create Application command. Once you click on it, you will be prompted to enter the necessary parameters.

The first parameter is called the Native Browser Instance Name. This allows us to create a variable to store information that defines this particular instance of the browser.

To create the variable, click into the parameter value and use the control + K hot key to open the variable manager tab. Give this variable a name (for example, vBrowser) and select the variable type OB App Instance. Click OK to create the variable.

Next, you must indicate the browser you wish to use. Here, we are using Chrome. Finally, in the URL parameter, enter the URL to the Google home page. Click OK to add the command to the automation. If you run the automation now, it should open up Chrome and navigate to the Google search page.

Finding the Google Stock Price

In OpenBots Studio, search for the Native Browser Set Text command. First enter the Browser Instance variable that was created in the previous step.

Next, under the Element Search Parameter heading, click on Native Element Recorder. The recorder feature automatically captures element parameters for you. Once the recorder is active, move the mouse cursor over the Google search text field to highlight it and left click. This should open up OpenBots Studio and automatically fill in the necessary parameters.

Now, in the Text Set field, type Google Stock. This will tell your automation what to put in the search field. Adjust any additional settings as needed and click OK to add the command to your automation.

Now, to simulate the user pressing the Enter key on their keyboard, search for the Send Advanced Keystrokes command.

Under the Selected Key column, use the dropdown menu to select the Enter [Return] key. Under the Selected Action column, select the Key Press (Down + Up) option from the dropdown menu to simulate the user pressing the Enter Key. Press OK to add the command to the automation.

Extracting and Displaying the Google Stock Price

If you run the automation now, it should bring you to a webpage on Google Chrome that displays the current Google stock price. Now, you must extract and display that price.

In OpenBots Studio, search for the Native Browser Get Text command. Fill in the Native Browser Instance Name field. Click on the Native Element Recorder, highlight the Google stock price field on the webpage, and left click to obtain the necessary parameters.

In the Output Text Variable field, use the control + K hotkey to create a new string variable. This variable will contain the stock price value that your automation just extracted. Click OK to add the command to your automation.

Now, all that is left to do is display the extracted price. In OpenBots Studio, find the Show Message command. In the text box, enter the name of the stock price variable you just created. Click OK to add the command to your automation.

Finally, run the entire automation to ensure that everything is working properly.

Congratulations! You just created your first web automation using OpenBots Studio!

Newsletter Bot

Lets stay in touch!

Join our weekly newsletter and follow us on social media.