Objective

The objective of this How-To guide is to create and open a web browser then navigate to a web page in OpenBots Studio. Most web processes require utilization of a web browser to navigate to a specific URL and to access a web page according to the project’s specific requirements. OpenBots Studio enables the user to create a web browser, navigate to a webpage, navigate forward and back, and refresh the page throughout the entire process.

Walkthrough
The following are the steps involved in creating a web browser in OpenBots Studio. It is a procedure that involves click level operations from the Web Browser command list During this walkthrough, we will be using the Selenium Browser commands. The Native Browser version of these commands will be covered in a future tutorial.
Step 1: To access a website throughout the entire process, a global instance must be created first so that automation can differentiate between different browser windows (if multiple is created). The Selenium Create Browser command helps in performing this task. This command will also specify which URL the browser window will first navigate to.
  • Select the Selenium Create Browser command
  • Enter the Browser Instance Name (Variable of OBAppInstance type used to identify the Web Browser file opened by this command) (Example: Testing)
  • Select the Browser Engine Type (Example: Chrome)
  • Enter the URL to navigate to (https://koa.com/campgrounds/west-palm-beach/https://koa.com/campgrounds/west-palm-beach/)(There are the Chrome, Firefox, and Internet Explorer Browser Engine Types. These will open up a browser window of the specified browser type.)
  • Select the Window State (Example: Maximize)
  • Click OK
The output of this command will navigate to the web page provided.
Step 2: Once the webpage has loaded (Accessing the website information and extracting the data from webpage will be discussed in the Semi-Complex Web Browser Commands Guide). Navigate back to the default Chrome Browser Page. This is to demonstrate that the Navigate Back command functions similarly to the browser’s Back Button.
  • Select the Selenium Navigate Back command
  • Enter the Web Browser Instance Name (Global instance created before) (Example: Testing)
  • Click OK
Step 3: Once the default Chrome browser webpage has loaded. Navigate forward to the URL Web Page that was initially used (https://koa.com/campgrounds/west-palm-beach/). This command will function similarly to the browser’s Forward Button.
  • Select the Selenium Navigate Forward command
  • Enter the Web Browser Instance Name (Global instance created before) (Example: Testing)
  • Click OK
Step 4: Once the webpage has been loaded. Refresh and load the webpage. This command will obviously refresh the web page and is useful if an error occurs or if data needs to be refreshed on a web page.
  • Select the Selenium Refresh command
  • Enter the Web Browser Instance name (Global instance created before) (Example: Testing)
  • Click OK
Step 5: Once the process has been completed, the web browser instance must be closed using the Close Browser command. It is important to close these instances to avoid errors caused by the browser already being open when the process is executed.
  • Select the Selenium Close Browser command
  • Enter the Web Browser Instance Name (Example: Testing)
  • Click OK
All the commands in this guide can be utilized alongside many of the other commands that will be discussed in later guides. Below is a snapshot containing most of the commands used to access and navigate to the URL of a web page in this guide.

Commands utilized for the above concept (Accessing and Navigating URL) are as follows:

Web Browser Commands: Selenium Create Browser, Selenium Navigate Back, Selenium Navigate Forward, Selenium Refresh, Selenium Close Browser Application.

Note: The Pause Script commands are used in the automation because they pause the script for a certain amount of time specified by the user. The script that is currently being run (which is the code used for the automation built in the guide) will be paused by the amount of time specified in milliseconds (1000 milliseconds = 1 second). This is incredibly useful for certain automations/processes because certain tasks take some time to perform, like loading a web page. If the automation tries to perform an action on a page that isn’t fully loaded, then unnecessary errors could start to appear.

Newsletter Bot

Lets stay in touch!

Join our weekly newsletter and follow us on social media.

Contact Sales
Call Our Experts!