+ All Categories
Home > Documents > CODELESS SELENIUM FOR DESKTOP AUTOMATION

CODELESS SELENIUM FOR DESKTOP AUTOMATION

Date post: 15-Mar-2022
Category:
Upload: others
View: 13 times
Download: 0 times
Share this document with a friend
20
Codeless Selenium for Desktop Automation 1 a LEAPWORK whitepaper Everything you need to know about automating testing on your desktop applications with codeless technology. CODELESS SELENIUM FOR DESKTOP AUTOMATION
Transcript

Codeless Selenium for Desktop Automation

1

a LEAPWORK whitepaper

Everything you need to know about automating testing on your desktop applications with codeless technology.

CODELESSSELENIUM FORDESKTOP AUTOMATION

Codeless Selenium for Desktop Automation

2

Introduction

What is Selenium?

The Selenium tool suite

The advantages of Selenium

The disadvantages of Selenium

Searching for an alternative: What to consider

Test automation tools for desktop: a comparison

3

5

6

8

9

11

14

Codeless Selenium for Desktop Automation

3

Over recent years, the software testing landscape has changed, and today, many

applications are either web or mobile-based. However, many businesses continue to

rely on desktop applications to run their most important business processes.

These processes are often built up by a myriad of transactions across technologies,

making them not only complex, but also vulnerable to changes and updates. This is

why many choose to test them and automate them as much as possible.

Performing testing manually is very time-consuming, but, because it’s essential to

the business, it cannot be skipped or rushed. Business processes need to be tested

continuously, and the only way to do that without spending lots of resources is to

automate testing.

By automating testing of desktop applications, testers help eliminate mundane,

tedious, repetitive and error-prone tasks, which increases productivity, reduces risk

and lowers costs for the business.

The problem is, Selenium doesn’t support test automation outside of browsers.

THE SELENIUM PARADOX (WHY MOST PEOPLE GET STUCK WITH SELENIUM)In many ways, Selenium test automation is a bit of a paradox: It’s supposed to relieve testers from manually executing test cases, and with that, save them time and keep errors from occuring.

But in reality, automating has become almost synonymous with programming. This means testers often end up spending unnecessary time on setting up and maintaining automation flows, when they could be spending it on exploratory and user-focused testing.

Introduction

Codeless Selenium for Desktop Automation

4

SO, THE QUESTION IS: HOW CAN BUSINESSES AUTOMATE TESTING OF THEIR DESKTOP APPLICATIONS WITHOUT CODING?

To help you answer this question, we have put together this whitepaper. We’ll give

you an overview of what Selenium can and cannot automate, and what to look for in

a test automation tool.

This will help you evaluate what you need as a tester when looking for the best

automation tool to automate desktop applications and other technologies.

Codeless Selenium for Desktop Automation

5

WHAT IS SELENIUM?And why it doesn’t work for desktop automation

Codeless Selenium for Desktop Automation

6

WHY SOFTWARE TESTING?Over the past 20-30 years we’ve seen a massive transformation in how technology is used, and many businesses today have become completely reliant on software systems.

Software testing is key to enabling fast and error-free software, and thereby ensuring that businesses can deliver what end-users today expect from products and services.

THE SELENIUM TOOL SUITE Selenium consists of three tools that each enable skilled programmers to automate

different things. Below is a brief overview of the different tools and their key differences.

What you will notice in the below descriptions is that there are no Selenium tools that

enable a tester to automate desktop applications.

SELENIUM IDE

Selenium IDE is a ‘record and playback tool’ that can help you create

and edit test cases and test suites.

IDE (Integrated Development Environment) is a Chrome and Firefox plugin that is

used to create and execute test cases. It lets you create test cases by recording

your interactions with the browser. Your interactions are ‘transformed’ into steps in

Selenium’s own language. These steps can then be exported in different programming

languages, including Java, Python and Ruby, that can then be executed later. The

end result is the entire test script in your language of choice.

Codeless Selenium for Desktop Automation

7

SELENIUM WEBDRIVER

Selenium WebDriver is a programming interface that can be used to

create and execute test cases. WebDriver allows you to test across all

the major programming languages, browsers and operating systems.

However, you cannot automate desktop applications.

The test cases are created using elements locators. You locate your elements with

one of the eight Selenium element locator techniques and the WebDriver methods

will then let you perform actions on those elements. The script you create interacts

directly with the browser (which is the reason it’s much faster than the depreciated

Selenium RC). There are different drivers for different browsers, which ‘interpret’ the

script you write for it.

The downsides of Selenium WebDriver include that it doesn’t generate test reports

on its own and that there is no centralized maintenance of objects or elements.

The downside of Selenium IDE is that it is mainly meant for prototyping and syntaxing,

not full-fledged testing. A few of the restrictions include not being able to script with

regular programming language, not being able to test dynamic web applications,

and not being able to import data to support data-driven testing.

SELENIUM GRID

Last is Selenium Grid. Selenium Grid allows you to run multiple tests

at the same time on multiple machines, also known as parallel testing.

It’s an environment with multiple systems, but one ‘master’ system (the hub) which

controls the child systems (the nodes). The child systems can for example be Child

1: Windows 10 running Chrome, Child 2: MAC running Safari, Child 3: Linux running

Chrome, and so on. From your master system you can check if your application runs

as you want it to on all the different child systems. The instructions are sent through

the hub in your chosen programming language.

Codeless Selenium for Desktop Automation

88

THE ADVANTAGES OF SELENIUMCombined, the Selenium tool suite offers a number of possibilities for test automation.

Selenium has become one of the most popular testing tools, mainly because it’s an

open-sourced framework (making it free and accessible to all), and it enables skilled

testers to automate many testing processes, such as functional tests and regression

tests.

Selenium can be used across several browsers, it supports several operating systems

and it works with multiple programming languages, meaning it integrates well with

many business systems.

Furthermore, due to it being open-sourced, the tool can be modified to the needs

of the user, and there is a large community of users to learn from and share best

practices with.

In sum, the advantages of Selenium are:

• It’s free, as opposed to most other automation tools that include licensing costs

• It’s open sourced, allowing extension and modification of source code

• It supports multiple programming languages

• It supports most operating systems

• It supports all major browsers

• It has community support, due to the large network of users

• It has integration options, allowing e.g. parallel testing and reporting

Codeless Selenium for Desktop Automation

99

THE DISADVANTAGES OF SELENIUMAlthough Selenium has many advantages, it also lacks a number of functionalities to

make it the ultimate test automation tool.

First of all, Selenium only allows you to test web applications – not mobile or desktop.

Useful functionalities such as reporting and data-driven testing are also only possible

with the integration of additional tools.

In other words, Selenium is in no way an ‘all-in-one’ platform.

The biggest disadvantage to testers, however, is probably that it requires programming

skills to write tests. Although it may be considered an advantage to programmers

that Selenium allows you to use any programming language you like, to most testers,

it won’t be an advantage, because testers don’t necessarily know how to write code.

This leaves the tester with two options: Rely on a developer to set up and maintain

the tests or learn how to program.

In addition to writing scripts, you’ll need to maintain them. Again, if you’re a highly

skilled programmer with lots of time on your hands, you might be able to find and fix

any potential flaws in your script, such as the one pictured below. But if programming

is new to you, you might find that maintaining such a script can be a bit of a headache.

Codeless Selenium for Desktop Automation

1010

With the pros and cons of Selenium described above, you should now have a clearer

picture of what Selenium can and cannot offer you.

52% 43%

34%

SAY THEY DON’T HAVE ENOUGH TIME

SOME OF THE CHALLENGES COMPANIES FACE IN TESTING ARE TIME, TOOLS AND METHODS:

SAY THEY DON’T HAVE THE RIGHT TOOLS

SAY THEY DON’T HAVE THE RIGHT TESTING PROCESS OR METHOD.

Capgemini Quality Report 2019

Codeless Selenium for Desktop Automation

11

SEARCHING FOR AN ALTERNATIVE: WHAT TO CONSIDER

Codeless Selenium for Desktop Automation

1212

There are a vast number of tools and testing frameworks available for desktop

automation.

If you decide to explore other options, here are a few features that you should

consider with your team’s and business’ needs in mind:

• Is it easy-to-use, enabling testers to set up test cases from day one?

• Is it visual, providing you with a good overview of your test suite?

• Is it collaborative, allowing your team to work together on the software?

• Is it code-free, enabling all testers to set up and understand test cases?

• Is it adaptable, working across all web, mobile and desktop apps and technologies?

• Is it trackable, capturing why test cases fail in recorded videos and logs?

• Is it able to fully support an automated release pipeline without requiring

additional coding effort?

• Is it supported, providing you with the help you need, when you need it?

Automation, and especially smart test automation, is poised to bring about significant changes in the way QA and testing is done over the next two to

three years and organizations need to have a strategy and roadmap in place if

they want to reap the benefits.

Capgemini Quality Report 2019

Codeless Selenium for Desktop Automation

1313

Selenium Automation?

Codeless automation tools have grown in popularity as they relieve many headaches

for software testing teams. They allow every team member, regardless of skill or

level, to set up and execute test cases from day one. This can shorten the test suite

setup time substantially.

For the tester, this means simplifying the testing process of creating testing scenarios

by replacing written scripts with visual building blocks. For the developer, this means

speeding up the entire process, and letting them focus on software development

and innovation.

With a test automation tool that hides the code behind the scenes and only shows

the most necessary actions and steps up front, the tester can also much more easily

maintain scripts, as they’ll have a clearer overview of the steps and can detect if

changes need to be made.

AT THE CORE OF THE OBSTACLES TESTERS FACE IN ADOPTING AUTOMATION LIES USER-FRIENDLINESS. Fortunately, as Capgemini notes in their 2019 Quality Report, there is now an increasing number of tools and solutions which help testers overcome these obstacles. Especially the difficulty of automating testing in desktop.

Visual, no-code automation tools are a good starting point, as their user-friendly nature lets tester get started with it quick and easy.

Codeless Selenium for Desktop Automation

14

TEST AUTOMATION TOOLS FOR DESKTOP:A COMPARISON

Codeless Selenium for Desktop Automation

15

Open-source automation tools have the benefits of being free and typically also having

a large community of fellow testers that can help and provide the documentation

they need to get started with test automation.

But desktop applications differ from web applications in that they are typically

installed on a personal computer or workstation, in which case the testing process is

simplified somewhat.

Besides Selenium, there are a series of other open-sourced automation tools, such

as Twin, Jau, and White, that allow you to automate desktops, and which are actually

designed for it.

However, these tools still have limitations. White, for example, only works for

Windows desktop automation. So if you want to automate across operating systems,

you’ll have to use multiple tools.

When taking this approach, testers see that, down the road, their testing suites

become more and more complex, and therefore require more time for maintenance,

taking away time from test design and improvement.

This is why many testers eventually choose to switch to a commercial tool that will

allow them to scale and easily maintain their testing efforts.

If you find yourself in this situation and are on the lookout for a new testing tool, there

are a number of features that you should look for in the desktop test automation tool.

Below you’ll find a comparison between Selenium and another test automation tool.

This comparison will give you a clearer idea of what you need to look for in a test

automation tool for desktop automation.

Start SuccessRead Excel contacts Create in Salesforce

Source file

Contacts.xslx

Expand

Full name

Company

Contact source

Contact name

Company

Contact source

Salesforce linkLink

Connected

James , Tom

Akin , Kristen

Cotton , Phyllis

Name

Expand

Start Web Browser

Browser to start

Chrome

Web adress (URL)

login.salesforce.com

Expand

Validate contact

Codeless Selenium for Desktop Automation

16

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.

Codeless Selenium for Desktop Automation

17

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 controlNo 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.

Codeless Selenium for Desktop Automation

18

APPLICATIONS SUPPORTED

Selenium WebDriver LEAPWORK

Web

ApplicationsSelenium supports most web applications.

LEAPWORK supports most web applications.

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

applicationsWindows applications outside browsers are not supported.

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

Citrix

applicationsCitrix applications are not supported.

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

Mainframe

applicationsMainframe 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.

Codeless Selenium for Desktop Automation

19

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.

Codeless Selenium for Desktop Automation

20

a LEAPWORK whitepaper

Go Ahead, Automate Today

Try the LEAPWORK Automation Platform for yourself or book your product demonstration today.

BOOK DEMO START TRIAL


Recommended