Leapwork
Adressevej 12
1234 Bynavn
Selenium is a great tool for professional programmers who want to automate web applications, but for users who don’t write code nor want to, there are better options. This post compares the code-based Selenium to Leapwork web automation. Watch our side-by-side video comparison of the two.
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 as a real user would.
The benefits of Selenium include:
If you are a professional programmer with years of experience writing reusable and maintainable code and 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 that 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.
Let’s start by taking a look at a simple test automation example:
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:
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:
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:
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:
The same test case automated with Leapwork, made up of six standard components.
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.
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.
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 behavior 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 doesn’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. |
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.
With brick and mortar stores closed during an on-going pandemic, websites, especially e-commerce websites, have to focus...
Websites and web applications are a huge part of how businesses acquire customers. Just one poor customer experience can...
Automating the test cases for your web application will most probably improve the efficiency and quality of your testing...