Web Automation

Everything you need to know about automating web-based tests and processes

Jump to section:

Watch Webinar
Start trial

Customer interaction is increasingly happening online. This means that websites and web applications are crucial to generating revenue, and that several front- and back-office applications are migrated from desktops to web-based interfaces or the cloud. This transformation creates a technology dependency.

1. What is Web Automation?

Web automation is the concept of letting software robots perform actions, tasks, and processes on a web browser or web application.


What can you do with web automation?

Think of all the clicking and typing you do at your desk every day involving websites and web-based applications. All these actions can be automated with web automation.

These types of tasks can include:

  • Filling out forms and fields
  • Scraping content from a web page
  • Extracting and transferring data between applications
  • Clicking buttons and elements

Every day, in businesses of all sizes, there are scenarios where automating tasks like these would come in handy. For example:

  • Importing contacts into a CRM system from a third-party service
  • Testing the user experience and order handling of an online shop
  • Integrating a web-based ERP-system with a document management platform in the cloud

What is Selenium browser automation?

When talking about web automation, there is no way around Selenium, the world’s most popular open-source framework for automating browsers.

The Selenium tool suite consists of Selenium WebDriver, an automation tool built for automating in the browser, Selenium IDE, a record and playback tool, and Selenium Grid, a parallel testing tool. In the following, we'll focus on Selenium WebDriver.

Learn more about Selenium automation in our whitepaper.

All components of the Selenium suite are open-source tools for automation of websites and web applications, and not other types of applications, such as desktop.

WebDriver is an API that can automate any action that takes place in a web browser. It drives browser actions natively, meaning that it interacts with browser elements, like clicking on buttons, typing text in fields, etc., like a real user would.

Selenium WebDriver is operated by writing code in a programming language, such as C#, JavaScript, PHP or Python.

Creating a Selenium script is a 7-step process as described in SauceLabs’ Selenium introduction:


Group 10096


Below is an example of what a Selenium test script can look like. In this case, the WebDriver is instructed to:

  1. Open a Chrome browser
  2. Navigate to the web page amazon.com
  3. Input the term “Lego” in a search field
  4. Wait for the page to load results
  5. Click on one of the items in the search results, and then
  6. Conclude the test case by verifying the presence of a specified

As illustrated by this case, a considerable amount of programming proficiency is required to understand, let alone create, a relatively simple script.


Group 10097


The pros and cons of Selenium

Selenium is one of the most widely used frameworks for web automation, with good reason. The software’s strengths include:

  • Open source and free
  • Highly extensible
  • Can run cases across different browsers
  • Supports various operating systems
  • Supports mobile devices
  • Can execute cases while the browser is minimized
  • Can execute cases in parallel

Selenium vs. LEAPWORK Automation

In the examination below, you'll find a complex overview of Leapwork and Selenium. It requires a deep and broad understanding of the software to give you a practical understanding of working with Leapwork for web automation.

‘Pure’ Selenium automation

Leapwork web automation
based on Selenium

Can only be controlled by programming.       

x icon

Does not require the user to read or type a single line of code.

checkmark icon

Building automation cases takes time, requires specialized programming knowledge, and generates heavy maintenance workload. 

x icon

All web automation flows are built in and executed from the native Leapwork Studio where every browser action is represented by a building block containing all the hidden code and logic required to drive web automation commands.

checkmark icon

Requires an automation framework.

x icon

Does not require an automation framework. 


Can only automation web applications as it is not possible to access elements outside of a browser.

x icon

The Leapwork Automation Platform can access every element on a screen's UI. By combining the capabilities of Leapwork, the user can automate both web and desktop applications - and even across application types. 

checkmark icon

Does not come with a built-in object repository. 

x icon

All elements and files (i.e. 'Locators') used in automation cases, like web elements, images, etc., are automatically saved in an object repository. 

checkmark icon

Data-driven automation is more complex since you must rely on the programming language's capabilities for setting values for your data. 

x icon

Data-driven automation is easily done by visually connecting data sources to automation flows. 

checkmark icon

No official user support. 

x icon

Access to on-demand support from automation specialists.

checkmark icon

Has no native capability to record or export runtime data onto external formats. 

x icon

Runtime data are automatically generated as logs and video recordings, and results can be pushed to release platforms and pipeline orchestrators.

checkmark icon

Parameterization can be done via programming but is difficult to implement.

x icon

Parameterization does not require programming. You simply adjust the configurations of a building block or drag dynamic sources of inputs to the block. 

checkmark icon

No native support to generate bug reports. 

x icon

Reports are automatically generated. These can be visualized in dashboards and exported to stakeholders. 

checkmark icon

Codeless automation in action

Watch the video below to see how a Selenium-based web automation case is built without writing scripts.

Learn more about Codeless Selenium and how to automate with Selenium without coding.

2.How to Build Web Automation?

Think of all the clicking and typing you do at your desk everyday that involve websites and web-based applications. All these actions can be automated with web automation. Examples of tasks include:

Web-based tasks and processes can be broken down into three overall types of actions:

  • Operating browsers to navigate the web
  • Interacting with web elements, both static and dynamic
  • Inputting/outputting data, text, and numbers

Web automation with Selenium-powered building blocks

Imagine if each action and operation listed above was a building block that you could connect to make up visual workflows representing web-based processes.

That’s the idea behind LEAPWORK’s Selenium-powered web automation blocks. The example below automates the following process: Search for an item (“star wars lego”) in an online shop (amazon.com) and then compare the number of search results with a specified value (2500).


Codeless selenium web automation flow

The automation flow outlined in this example is created by connecting just seven commands, or building blocks:

Example of 7 step web automation

This approach of using visual building blocks to design processes enables automation of practically any web application and websites in any of the common browsers: Google Chrome, Mozilla Firefox, Microsoft Edge, and Internet Explorer. 



The extended guide includes:
1. A guide to web automation
2. A test automation strategy checklist
3. A web automation tool comparison chart

Common web-based operations and functionalities to automate

As mentioned above, all web-based tasks and processes involve operating browsers, interacting with web elements, and inputting or outputting data. Examples include: typing credentials into an authentication form, dragging and dropping elements on a web page and uploading a file to a web application.

Some operations are more challenging than others to automate, meaning they require a few more configurations to make a robot perform the operation correctly.

For example, with the LEAPWORK automation blocks, to find a specific element on a web page, you just need a simple “Find Web Element” block, but to verify an ‘infinite scroll’ functionality on a web page you need to do a minor configuration in the same block and then customize the strategy by removing the unique references to the captured element and making selection criteria generic.

However, you can still instruct a LEAPWORK robot to perform even this slightly more complex example without having to write a single line of code.

Read how to automate web elements: Testing the Internet

Now that we have covered the ‘bricks’ that make web automation, let’s take a closer look at how web automation is used across organizations to solve various challenges.

3.Web Automation use cases

Web automation is applicable to processes involving any website and web application, both external and internal. Below are some real-life examples of how organizations are benefiting from web automation.


Automating ticket creation and service desk requests

At a major utility company managing critical infrastructure for energy and gas, all service desk requests are managed with ServiceNow, a web-based business process platform.

ServiceNow is a great example of an application that can be automated with the codeless Selenium-based automation approach outlined above.

Read more: How to Automate ServiceNow: Test and Process Automation

Utilizing web automation, the IT process team at the utility company could automate the testing of business flows going across functions and departments involving multiple applications, including ServiceNow. This has allowed them to significantly reduce the time spent on testing in relation to system upgrades. This time was instead allocated to business-critical tasks, such as customer support.

More frequent system upgrades +
Earlier fixing of system bugs +
Security risks reduced =
Better Customer Experience

Automation of industry-specific back-office systems

Read the full story: Utility Company Frees up Customer-Facing Resources

Back-office functions are increasingly being handled with web-based applications – even industry-specific ones, such as Policy Management Systems (PMS) in the insurance sector and Transport Management Systems (TMS) in logistics companies.

From an automation perspective, this move to web-based technologies simplifies things: Any application that can be operated using a web browser, can be automated with the approach described in this guide.

For example, an insurance company moved from quarterly to monthly releases of their policy management system, by automating the testing of the system based on the web application Pega.

Another example: a global logistics company automated their web-based online booking system which integrates with their TMS, reducing weeks of workload to the few clicks required to instruct robots to perform repetitive tasks.

E-commerce automation

E-commerce plays a key role in selling and purchasing products and services today: Digital and mobile storefronts, electronic transfer of funds, web-based inventory systems, and online marketing are just a few of the different aspects of e-commerce.

Automating front- and back-end processes for monitoring and testing purposes can help enhance the robustness and quality of an e-commerce channel. This involves:

  • Ensuring the functionality of an online shop from an end-user perspective
  • Continuous monitoring of the operational status across channels

Learn more about e-commerce automation:
Monitoring and testing of your digital channels

Automating CRM workflows

CRM systems have great automation potential; they are used for processes that go across departments and functions, they are often web-based, and the tasks involved are often repetitive.

Salesforce, for example, is a top tier CRM solution for enterprises and organizations. It offers cloud services for managing sales, marketing, help desk requests and more. It's highly customizable and can be configured and extended to fit almost any requirement. The size and complexity of Salesforce means that many repeatable tasks are performed manually by sales reps, marketeers and managers over and over every day.

Learn more about automating Salesforce:
Test and Process Automation


Automating intranets and extranets

Web automation is not only for public systems. For example, a global manufacturer of medical devices automated a SharePoint-based service portal monitoring devices and systems at thousands of hospitals worldwide.


How to drive web automation with data

Web-based automation flows often involve repetitively inputting data, for example to fill out a form several times. There are several ways to feed data into automation flows, either by using static data sources, like spreadsheets, or dynamic sources, like databases, web services, and command shells.

4.ExcecutingWeb Automation

When it comes to executing web automation flows, there are two major concepts you need to know about:

  • Hosted environments: This is about executing automation flows across devices and systems using cloud-based services.
  • Parallelization: This means running automation flows on several machines at once.

How to set up hosted environments for automated web testing

To deliver a great end-user experience, web applications and websites must work across multiple browsers, browser versions, operating systems, and devices, including mobile.

With all the possible combinations, there is a large number of usage scenarios to be tested. One provider of hosted environments for automated web testing, Sauce Labs, at one point identified more than 2,000 devices and more than 800 browser-OS combinations – and those were just the most commonly used.

From a testing perspective, a question presents itself: Is it necessary for your organization to host all the possible combinations of browsers, operating systems, and devices in your own infrastructure to support automated web testing? This would come with additional costs and a massive administrative burden negatively impacting the business case for test automation.

Fortunately, you can outsource the hosting of test environments to vendors such as BrowserStack and Sauce Labs.

What follows is a walk-through of how to use hosted environments for web automation. Besides access to a provider of hosted environments, setup only requires a few things: A suite of automated test cases ready to be executed, and a service running the test cases, called the Controller.


hosted environments for web automation



web automation with hosted environment


With this setup, a test team does not have to worry about preparing and maintaining the machines and devices on which the test cases are executed. For example, it is not necessary to purchase, maintain, and charge a bunch of different mobile devices.

Continued reading on how to:
Automate Web Testing Across Browsers and Devices

Parallelization of Web Automation

Besides using environments hosted by cloud-based providers as described above, there are other ways to parallelize web automation, including execution agents and Selenium Grid.


Execution Agents – on local, remote, or virtual machines

An execution agent is a piece of software that is installed on every machine where automation cases are to run. Agents allow for a great deal of flexibility, as they can execute automation commands on both local, remote, and virtual machines. Agents can be installed in different and separate environments, including cloud servers, allowing for collaboration across teams and even across organizations, for example if you work with an automation partner.


Selenium Grid

Selenium Grid is a server for setting up different environments in which automation cases are executed. It is based on a Hub-Node concept and can be set up in your own infrastructure.


Selenium grid Hub node system


The Hub is the central machine running the automation cases, and the Nodes are different machines on which the actual browser automation takes place. The advantage of Selenium Grid is the ability to run multiple cases in parallel across different browsers, operating systems, and machines.

Setting up a Selenium Grid

The different options for parallelizing web automation with LEAPWORK are illustrated below. The LEAPWORK Controller is the test runner service, and LEAPWORK Studio is where users design their automated test cases. Learn more about the different deployment options with LEAPWORK.

Group 10112

The two major cloud-based providers of hosted environments, Sauce Labs and BrowserStack, are both supported by the LEAPWORK Automation Platform. This makes it incredibly easy to set up hosted environments for automated web testing.


The extended guide includes:
1. A guide to web automation
2. A test automation strategy checklist
3. A web automation tool comparison chart


Below is an overview of how Leapwork compares to Selenium Grid and hosted environments from cloud-based providers. Learn more about LEAPWORK's codeless Selenium solution or join our webinar on no-code web automation to see Leapwork in action.



Leapwork Agents

Fast, affordable, flexible. Allows for multiple deployment setups. 

Leapwork Agents

Does not require the user to read or type a single line of code. 

Selenium Grid

Fast and free of charge.

Selenium Grid

Requires setup and mainteance.

Hosted Environments from Cloud-based Environments

Allows for practically infinite parallelization.

Hosted Environments from Cloud-based Environments

Usually very expensive. Expensive capabilities might be redundant.


Download our Web Automation Whitepaper

Download the whitepaper to learn how to implement web-based test automation quickly and easily.