Book demo
Start trial
Book demo
Start trial

The LEAP

Automation insights and productivity tips from LEAPWORK.

All Posts

Comparison: LEAPWORK vs. Selenium Web Automation

Selenium is a great tool for professional programmers who want to automate web applications, but for users who don’t (want to) write code, there are better options. This post compares code-based Selenium with LEAPWORK web automation. Side-by-side video comparison included.

Selenium WebDriver is the world’s most popular open-source framework for automating browsers. Its API can be used to drive any action that takes place in a browser natively, meaning that it can click on buttons and type text into fields, just like a real user would.

The benefits of Selenium include:

  • Open source, free to use, and free of charge
  • Highly extensible
  • Works across different browsers
  • Supports various operating systems
  • Supports mobile devices
  • Can run while the browser is minimized
  • Can run in parallel

If you are a professional programmer with years of experience writing reusable and maintainable code and you are looking for a way to automate web applications in a browser, Selenium could be a great solution for you. It has a well-designed programming model and a large ecosystem of pay-as-you-go cloud services such as BrowserStack and Sauce Labs to run in parallel across multiple devices and browsers.

However, if you are a tester or you are managing a team of QA professionals, using Selenium directly may cause more problems than it solves; it’s a low-level solution to a high-level problem. Low-level means dealing with all the tiny, intricate technical details, while test automation on the other hand requires a high-level approach which hides complexity from the user through abstraction. In the end, it takes an enormous effort to implement, and more often than not, Selenium code grows into a beast impossible to maintain. 

A Simple Test Automation Example

Let’s start by taking a look at a simple test automation example:

  1. Open a Chrome browser and navigate to amazon.com
  2. Type “screwdriver” in the search field on the main page
  3. Click the “screwdriver set” suggestion link
  4. Validate that an image of a screwdriver set appears on the next page
  5. Close the browser

We’ll see how to code it for Selenium WebDriver and then afterwards what the same example looks like in LEAPWORK, which uses Selenium WebDriver under the hood.

First, here’s what the Selenium example looks like:

 

selenium screenshot

An example of Selenium automation, written with C# code.

 

As explained in the Sauce Labs’ introduction to Selenium, there are seven basic steps in creating a Selenium script for test automation:

  1. Create a WebDriver instance
  2. Navigate to a web page
  3. Locate an HTML element on the web page
  4. Perform an action on an HTML element
  5. Anticipate the browser response to the action
  6. Run tests and record test results using a test framework
  7. Conclude the test

It sounds straightforward, but it’s clear from the example above that it’s a very complicated and time-consuming task to write the appropriate code -- it takes an experienced programmer about 30 minutes to solve this small example, and even if the programmer is highly skilled, it would still require several trips to Google to look up how to do things correctly.

But the biggest problem facing non-professional programmers isn’t actually getting the automation code to work initially -- it’s maintenance of the scripts, particularly in an enterprise environment. The following is an example of an error that might appear periodically after the script has been running fine for a few weeks:

 

selenium error message

An example of an error message that might suddenly show when running Selenium automation. Users might not even know what the error message means.

 

How to deal with that? Who to call? Google results point to some articles from 2011, which look very outdated…

In contrast, here’s a screenshot of the same test automation example built in less than 2 minutes with LEAPWORK. It’s completely visual, doesn’t require any programming skills and can be easily maintained:

 

LEAPWORK example

The same test case automated with LEAPWORK, made up of six standard components. 

Video Demonstration: Selenium vs. LEAPWORK

We’ve asked two testers to build the same test case with their respective approach: Code-based automation using Selenium and codeless UI automation using LEAPWORK. We timed the efforts to evaluate which of the two approaches are more efficient. Spoiler alert: It’s not even close.

 

 

The Pros and Cons of using Selenium vs LEAPWORK

We’ve put together a list of pros and cons of using Selenium WebDriver directly with code versus using LEAPWORK to perform the same tasks.

You can also download a PDF version of the comparison here.

LEAPWORK vs Selenium graphic

Usability and Adoption

 

Using Selenium WebDriver with hand-written code

Using LEAPWORK, which uses Selenium under the hood

Programming needed

Can only be used by programmers, who get low-level access to browser behaviour and actions through using any programming language (C#, Java, Python, PHP, etc).

Can do the exact same thing with easy-to-use building blocks, and without having to read or write a single line of code. Perfect for non-technical users – or anyone who just don’t want to spend time on programming.

Enterprise support

No enterprise support exists, the Selenium project is run by the open source community.

On-demand live support from automation specialists.

Data-driven automation

Data-driven automation requires sophisticated programming and separate management and storage of data assets.

Data-driven automation is included out of the box. It is done by visually connecting data sources such as databases, API endpoints and Excel files with other building blocks.

Finding web elements

Uses highly complex CSS or XPath “selectors”, which require deep technical knowledge.

Point and click to capture any web element. Smart algorithms then automatically find the best way to locate it again in the future.

Road-map influence

Although Selenium is open source, the only way to influence the road map is to actively participate in the community programming effort for Selenium itself.

All enterprise users have direct access to live chat and product team representatives. About a third of all product development is a result of this dialogue.

Training materials

A good ecosystem and lots of code samples exist on the internet for professional programmers to use. Some tutorials on YouTube and many professional courses exist, but require technical skills.

All users have access to a comprehensive learning center with many hours of free videos. Enterprise users can participate in a professional certification program.

Speed of adoption

Typically takes 3-6 months for an initial project, then another 6-12 months for framework programming.

Most users are able to adopt within 3-5 days, using a structured learning and on-boarding program.

Documentation and Governance

 

Selenium WebDriver

LEAPWORK

Reporting and dashboards

No reporting or dashboard solution is included. Programmers can custom-build their own reporting framework (typically takes 3-6 months).

Reporting and dashboards are included out of the box. Results can also be pushed to other tools such as JIRA.

Automatic video recording

Video recording is not included and is very difficult to achieve, even with a custom-built solution. Programmers are typically limited to saving screenshots with no retention policy.

Everything is automatically recorded on video, and a retention policy can ensure old videos are automatically deleted.

Object repository and version history

An object repository is not included, but programmers can custom-build their own and decide on implementing code patterns such as Page Object Model. Version history can be achieved using source control systems such as Git, which most non-technical users find impossible to navigate.

All assets such as web element locators and flows are structured and stored in an encrypted database with built-in version history.

Access control

No access control is included, and is difficult to achieve with a custom-built solution.

Access control, both locally in the encrypted database and through Active Directory is included.

Tamper-proof audit trails

No audit trail capability is included, and is difficult to achieve with a custom-built solution.

All data is stored in an encrypted database with no direct access. Even administrators cannot change the audit log.

Applications Supported

 

Selenium WebDriver

LEAPWORK

SAP GUI

SAP GUI is not supported. Selenium only supports web applications and it’s not possible to access elements in desktop applications outside the browser.

Works across all technologies. SAP GUI is natively supported.

Windows applications

Windows applications outside browsers are not supported.

Works across all technologies. All Windows technologies such as WinForms and WPF are natively supported.

Citrix applications

Citrix applications are not supported.

Works across all technologies. Citrix and other virtualization technologies are supported with advanced text and image recognition capabilities.

Mainframe applications

Mainframe terminal applications are not supported.

Works across all technologies. Mainframe terminal applications are supported with advanced text and image recognition capabilities.

Java, IBM, and Oracle applications

Java applications, including IBM and Oracle Forms are not supported.

Works across all technologies. Java, IBM and Oracle Forms applications are natively supported, including the older Java 1.6 standard.

Test Execution and Integrations

 

Selenium WebDriver

LEAPWORK

Scheduling

 

 

No scheduler is included. Programmers can use a unit-test framework in combination with a custom-built scheduler or build pipeline.

Scheduling and ad-hoc running is included out of the box. Flows can also be triggered from a build pipeline or other third-party system.

Parallelization

Can run in distributed, parallel environments, but requires programmers to build a custom automation framework (typically takes 6-9 months).

Can run in distributed, parallel environments out of the box, including on BrowserStack, Sauce Labs and Selenium Grid as well as on LEAPWORK agents, where web, desktop and virtual applications can be automated together.

Built-in REST API

No REST API is included, but the WebDriver wire protocol is open source, and custom-built REST APIs can be made by programmers.

A full-fledged REST API is included out of the box, making it easy for DevOps to integrate with any third-party system.

Built-in CI/CD plugins

Any CI/CD platforms can be used by custom-built solutions. A good ecosystem and lots of code samples exist on the internet for professional programmers to use.

All popular CI/CD platforms can easily be integrated by DevOps using plugins or the REST API.

 

The Complete Guide to Automating Tests with Selenium

Read the LEAPWORK guide to learn more about Selenium as a test automation solution and its benefits in testing. The guide also covers the skills, effort, and resources required to fully succeed with Selenium. Finally, it proposes a web automation solution you can use without having to worry about the technical details.

 

Read the Complete Guide to Automating Tests with Selenium

Claus Topholt
Claus Topholt
CTO and co-founder of LEAPWORK.

Related Posts

How to Work with Agile Methodology in Testing for Successful Software Development

The introduction of agile methodologies has allowed software developers to ensure quality while decreasing production times and streamlining the development process. Within this methodology, testing has taken center stage to align development with customer needs.

How to Choose a Continuous Testing Tool

Testing continuously at multiple stages of the release pipeline supports delivery of high-quality software. Here’s how to pick an automation solution for your Continuous Testing needs.

The Critical Role of Continuous Testing in Continuous Delivery

To keep up with the ever-increasing customer expectations to digital products and services, software providers are under pressure to be more and more thorough in their quality assurance of products. Learn how Continuous Testing can support those efforts.