Browser Automation Using UiPath

A web browser (commonly referred to as a browser) is a software application for accessing the information on the World Wide Web. When a user requests a particular website, the web browser retrieves the necessary content from a web server and then displays the resulting web page on the user's device.

For example, upon starting a browser you need five different websites to be loaded to a specific point. Instead of manually opening each site, entering usernames/passwords and navigating to a specific page, the automation tool can perform all these tasks automatically.

Prerequisite for Browser Automation with UiPath

Go to your UiPath Home Page and Click on Tools, you can see a different type of extensions here. To work with the browser we have to install the Chrome extension.

chrome-extension-rpa-uipath

While installing chrome extension make sure that any other chrome browser should not be opened while adding this extension. If any chrome browser is opened then close the browser and then add this extension.

Click on the Chrome Extension to install in your system, If it is successfully installed, you will receive a pop-up message as shown below.
setup-chrome-extension-rpa-uipath

Open the google chrome, you will find a notification to enable it, If you did not find the notification then, click on the three vertical(:) dots on the right side in the google chrome and select Extensions under More Tools.
extensions-google-rpa-uipath

Once you click on the extensions you can see different types of extensions enabled in the google chrome, Go to UiPath Web Automation and click on details.
uipath-web-automation-extension-rpa-uipath

If the enable switch is Off then select On.
switch-on-uipath-web-automation-rpa-uipath

Now you can see a UiPath enabled icon on google chrome.
enabled-icon-on-google-web-page-rpa-uipath

Create a new process, called Browser_Automation_Process
creating-new-process-rpa-uipath

Add sequence and then add Open Browser activity inside the sequence. Create a variable called Value by pressing Ctrl+k as shown below.
creating-variable-value-rpa-uipath

Add the google URL("www.google.com") inside the variable under Default, by clicking on the variable pane
add-url-to-variable-rpa-uipath

Now save and run the sequence, the Internet Explorer will open the google.com.
google-search-engine-page-rpa-uipath

By clicking on the variable inside the open browser in the properties pane, you can change the browser type to either, IE, Edge, Chrome or Firefox. Make sure that before selecting any browser you should install them in your system.
select-browser-type-rpa-uipath

Now I am selecting Chrome in the browser type and run the sequence, the google page will open in the Chrome browser.
google-page-will-open-in-chrome-brwoser-rpa-uipath

We can also perform several activities by using the browser like, typing inside the browser and clicking on the Search button and many other activities. Let us see one by one.


Opening an Application in UiPath

Typing in Web Browser in UiPath

Add the Type Into activity inside the Open browser and enter a word that you want to type inside the text box within double-quotes.
type-hello-world-uipath-rpa

Click on the Indicate element inside browser and then select the google type box(Make sure that the google page is opened before clicking on the indicate element inside the browser).
select-google-type-box-rpa-uipath

Once you select the indicate element in the browser, the Type Into activity in the sequence will look like as shown below.
affter-selecting-ui-path-rpa

Now, Save and run the sequence, Once the sequence starts to execute, you can see that the Hello World has typed inside the google page.
hello-wordl-printed-in-google-rpa-uipath

Next, add Click activity into the sequence, so that after entering Hello World, you should click on the Google Search button to search for Hello World. After adding Click activity, click on the Indicate element inside browser and make sure that the google browser page is opened.
google-search-button-rpa-uipath

Now save and run the program, once the sequence executes, the Google page will open and types Hello World and then Clicks on Google Search button.

hello-wordl-printed-in-google-rpa-uipath

If you add Go Back activity into the sequence then it will go back to the home page.
go-back-activity-rpa-uipath

Save and Run the sequence, Once the sequence starts to execute the google search page will go back from Hello world search to its Home Page.
google-page-will-open-in-chrome-brwoser-rpa-uipath

Next, add the Navigate To activity inside the sequence and enter the preferred URL in the below box as shown in the below image.
navigate-to-given-url-rpa-uipath

Once you run the sequence the browser will navigate to the mentioned URL.
chercher-tech-home-page

PDF Automation by Using UiPath Studio

Web Data Entry Using Browser Automation In UiPath

In web data entry services, Websites or web portals are platforms to get in touch with the customers and provide them the information about our services and products. The latest information is updated on the website that gives knowledge of your recent services and products.

Data entry can be done to web pages or to any other applications. UiPath is one of the best fit application for data entry. Data entry can be done to any form, or to any support tickets or applications, Where you need to populate the data from Excel or from any other source to the web pages.

Example.1:

The following example demonstrates Data Entry by using UiPath.

Go to the Browser_Automation_Process and create a new sequence called Data_Entry_Example and then add Open Browser activity inside the sequence.
adding-open-brwoser-activity-rpa-uipath

For this demo, I am using our chercher.tech editor page to demonstrate the data entry process. Create a new variable called Task and populate your data entry form(https://chercher.tech/practice/editor.html) URL inside this variable.

For demo purpose, you can use this URL Contact Information

To populate the URL inside the variable, click on variable pane and enter the URL(https://chercher.tech/practice/editor.html) of the editor under the default within double quotes as shown below.
extend-scope-of-variable-to-global-rpa-uipath

Next, add Type Into activity inside the Do container of the Open Browser activity and Indicate the Title of the article into the browser(Make sure that the page is opened in the browser) and enter Title in the text box as shown below.
indicate-title-rpa-uipath

Next, add one more Type Into activity and indicate the chapter name of the article in the browser. and enter the Chapter name in the below text box as shown in the image.
chapter-name-rpa-uipath

In the same way, add Type Into activity for each field and indicate elements in the browser.
file-name-rpa-uipath
author-name-and-description-rpa-uipath

Once we enter the required field we need to Validate and Finish, so the file will be created with the given credentials. For this, you need to add click activity and indicate it in the browser as shown below.
add-click-button-for-validate-and-finish-rpa-uipath

Now, save and run the sequence, Once the sequence starts to execute, the editor page will open in the browser and enters the details in the required field and clicks on the validate and finish button.
practice-page-rpa-uipath

You can see in the below image the finished button has clicked automatically.
clicking-on-finish-button-rpa-uipath-1

Installing/Managing Packages in UiPath Studio

Web Data Scraping using Browser Automation in UiPath

Data scraping enables you to extract data from your browser, application or document to a database, .csv file or even Excel spreadsheet.

Structured data is a specific kind of information that is highly organized and is presented in a predictable pattern. For example, all Google search results have the same structure: a link at the top, a string of the URL and a description of the web page. This structure enables Studio to easily extract the information, as it always knows where to find it.

Most of the organizations extract the data manually, some use Python, Selenium, etc.. Let us see some examples for data scraping using UiPath.

Go to Browser_Automation_Process and create a new sequence as Data_Scrapin_Example
data-scraping-sequence-rpa-uipath

Example:1.

This example is about to get the data scarping of Hotel reviews and Hotel description in Bangalore. For that, I am going to scrape the data from the bookings.com website.

Add the Open Browser activity inside the sequence and add the www.bookings.com URL in it as shown below.
add-serach-city-and-indicate-it-rpa-uipath

Next, we have to search for Bangalore location on the bookings.com website, so add Type Into activity inside the sequence and indicate search element on the website(Make sure that the bookings.com website is opened).
add-serach-city-and-indicate-it-rpa-uipath

To decide which activity you need to add next, open the website in the browser and practice it and then it will become easy for you to automate it. Add the click activity to select the Bangalore.
add-click-activity-rpa-uipath

After adding location, we need to click on the search button, so add one more click activity and then indicate it on the website.
add-click-activity-rpa-uipat

Once you click on the Search button on the website, you will find a list of hotels in Bangalore.
list-of-hotels-in-bangalore-rpa-uipath

Now save and run the sequence, once sequence starts to execute, The browser opens the Bookings.com website and then enters the Bangalore as the search location and then clicks on the search button.
automation-output-rpa-uipath

To close the calendar page, you can add the Click button and select the Close (⊗) symbol and indicate it on the website.
indicate-calender-close-symbol-rpa-uipath

Now if you run the sequence, it will automate everything and closes the calendar automatically.

Now, let us see how the UiPath is going to extract the data from the website. You will find a Data Scraping Pane under the Design Tab. The Data Scraping will extract the structured data from a web page and even if it is an application.
data-scraping-rpa-uipath

Select the Data Scraping and open the Bookings.com or any other website where you want to scrap the data and then click on the Next button as shown below.
data-scraping-on-bookings-com-rpa-uipath

Click on the Name of the Hotel, Once you click on the first hotel name, Select Element wizard will occur on the screen, click Next and select second hotel name to make a pattern.
select-element-wizard-rpa-uipath

Now, you can observe that all the hotel names have been selected
highlighting-all-the-hotel-names-rpa-uipath

The Configure Columns wizard will occur on the screen, Enter the Extract text column name as Hotel Name and if you want to extract the hotel URL click on the Extract URL checkbox and create a URL Column by the name Hotel URL and click on Next as shown below.
configure-column-rpa-uipat

Once you click on the Next, The Preview Data wizard will appear on the screen. In that, you can find the Hotel Names and Hotel URL will be extracted in the table format.
preview-data-rpa-uipath

We also want to extract the description of the hotels and ratings. By clicking on the Extract Correlated Data you can able to extract any other information you want to. Click on Extract Correlated Data and select the description and then click on Next and select the second hotel description.

Once you select the description the configure column wizard will appear, enter the Hotel Description in the Extract Text column and click on Next.
hotel-description-rpa-uipath

You can see a preview data, which contains Hotel description in it.
hotel-description-uipath

Click on the Extract Correlated Data and extract the ratings of the hotels. As soon as you select the ratings, the data scraping will collect ratings of all the hotels. Enter the column name as Hotel Ratings and click on the Next button in the Configure Columns wizard.
hotel-rating-rpa-uipath

In the preview Data, you can see the hotel rating column has been added.
hotel-review-rpa-uipath

If you Go to the bottom of the Bookings.com page, you can see that the hotel's list continues still 25 pages, Make UiPath understand that there is a Next button you can even go to that page.
click-on-next-page-rpa-uipath

Click on the Finish button in the preview data.
click-on-finish-butto-in-preview-data-rpa-uipath

As soon as you click on the Finish button in the Preview Data, Indicate Next Link wizard will appear on the screen which is asking Is data spanning multiple pages, contains options Yes or No. If your data contains multiple pages click on Yes or else No. Here the Bookings.com contains Multiple pages so I am clicking on Yes.
indicate-next-link-rpa-uipath

And select the Next page symbol.
click-on-next-page-rpa-uipat

Once you select the Next page button, it will navigate to the UiPath which has created a wizard by using data scraping as shown below.
browser-automation-uipath-last-1

Now, let see some of the properties of Data scraping in the property pane, The Delay between table you can any number like 100,200,300. And the maximum number of results contains 100, if you want to increase the number means you can increase it.

The Output is in the Extract Data table, which means, the data table is used to refer to a grid that contains rows and columns. These rows and columns are stored in a variable of type Datatable, so whenever you see a variable of a type Data table you need to understand that it contains rows and columns.

This Data table can be directly taken to the excel. In the Excel Automation article will see out to do that.
browser-automation-uipath-last-2

Add the write Range activity inside the sequence, create a .xlsx document and add the path into the activity and enter the remaining fields as shown below.
write-rang-rpa-uipath

0 results
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions