0% found this document useful (0 votes)
15 views20 pages

LEAPWORK_Selenium for Salesforce Automation

Automation Tool

Uploaded by

divya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views20 pages

LEAPWORK_Selenium for Salesforce Automation

Automation Tool

Uploaded by

divya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Selenium for

Salesforce Automation
Everything you need to decide if Selenium is the tool
for your Salesforce test automation needs
Table of contents

3 Introduction

5 What is Selenium?
5 A short history of Selenium
7 The Selenium tool suite
9 The advantages of Selenium
10 The disadvantages of Selenium

13 Searching for an alternative test


automation tool: what to consider

16 Test automation tools for Salesforce:


a comparison

Don’t have time to read the full


whitepaper on Salesforce?
Book a meeting with one of our automation experts,
or check out our Salesforce solution brief.

I’d like to book a meeting I’d rather read the brief

Selenium for Salesforce Automation | 2


Introduction

In the search for the best automation tool to automate Salesforce,


many choose Selenium as their go-to tool. If you are considering
Selenium for testing Salesforce, read on to make sure you make an
informed decision, and know the challenges that may lie ahead.

Selenium is a popular web-testing tool. It’s free and open-sourced, and


an obvious starting point for someone wanting to see how automation
can contribute to productivity. It also allows you to drive tests and
automate any processes that go on in a browser. Since Salesforce runs
in the browser, Selenium is an obvious choice.

While Selenium checks a few boxes up front for teams wanting to


automate their Salesforce tests, many find that it requires more of a
time investment than initially expected – both in terms of setup and
maintenance. There is a high risk of ‘testing bottlenecks’ when using
Selenium to test web-based technologies such as Salesforce, which is
why many opt for more user-friendly, code-free tools.

Selenium for Salesforce Automation | 3


The Selenium paradox (why most people get stuck with Selenium)

Selenium test automation is a bit of spending unnecessary time


a paradox: It’s supposed to relieve on setting up and maintaining
testers from manually executing test automation flows when they could
cases, and with that, save them time be spending it on exploratory and
and keep errors from occurring. user-focused testing.

In reality, automating has become


synonymous with programming.
This means testers often end up

So the question is: is Selenium worth


the time investment?
To help you answer this question, we have put together this
whitepaper. We’ll give you an overview of Selenium that will give you a
basic understanding of the Selenium tool suite and the pros and cons
of the tool.

This will help you evaluate if it fulfills your needs as a tester or


testing team when looking for the best automation tool to automate
Salesforce. Because we see that many testers struggle with Selenium,
we will also suggest an alternative that solves many of the problems
faced by Selenium users.

Selenium for Salesforce Automation | 4


What is Selenium?

A short history of Selenium


The first version of Selenium was created by Jason Huggins in
2004. He was tired of spending time and energy on testing web
applications and came up with a JavaScript library that allowed him to
automatically run tests against multiple browsers.

Selenium thus became the first tool that enabled its users to control a
browser using any programming language.

But although Selenium allowed its users to automate many things, it


wasn’t without drawbacks. Firstly, because it was based on JavaScript,
certain things were impossible to do. On top of that, web apps became
more complex with time, causing even more restrictions within the tool.

A couple of years later, an engineer at Google named Simon Stewart


got fed up with Selenium’s limitations. He wanted a tool that would
speak directly to the browser using its native language and operating
system. Hence WebDriver was born. It took a few years for Selenium to
merge with WebDriver, but when they did join forces, it meant taking
the best of both worlds and bringing a massive community of the
brightest minds in test automation under one roof.

A lot more has happened since then, and in addition to Selenium


WebDriver, the Selenium project has evolved into a tool suite that
consists of Selenium WebDriver, Selenium IDE, and Selenium Grid.
Selenium Remote Control (RC) was also a part of the toolbox, but has
since been depreciated, mainly because it was incredibly slow…

Selenium for Salesforce Automation | 5


Selenium history timeline

Selenium becomes Selenium


open-sourced WebDriver

First version of WebDriver merges


Selenium with Selenium
(Selenium Core) Selenium IDE Selenium Grid (Selenium 2)

2004 2005 2006 2007 2008 2009 2010 2011

Selenium RC

Why software testing?

Over the past 20-30 years we’ve Imagine if a bug in Amazon’s pricing
seen a massive transformation in how system meant that products were
technology is used with businesses being offered at a significantly
becoming completely on software lower or higher price. Sales would
systems to operate. Software testing either drop or skyrocket with no
is key to enabling fast and error-free return, and the business would suffer
software and ensures that businesses tremendously.
can deliver what end-users expect
This is just an example, but there are
from products and services.
countless real world examples of
A few examples of businesses that businesses that have lost millions due
depend on web applications to deliver to improper software testing.
their products and services include
So how do these companies avoid
Amazon, Airbnb, and Netflix.
dangerous glitches like these? They
How would these businesses run if it test their software to lower risk.
weren’t for internet systems? What
would happen if there was a flaw in
their systems?

Selenium for Salesforce Automation | 6


The Selenium tool suite
Selenium consists of three tools that enable skilled programmers to
automate different things. Below is a brief overview of the different
tools and their key differences.

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 result is the entire test script in your language of
choice.

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

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 for Salesforce Automation | 7


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 there is no
centralized maintenance of objects or elements.

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.

Selenium tool suite

Selenium IDE Selenium Webdriver Selenium Grid


Chrome and Firefox Programing interface Run multiple tests at the
plugin that creates test that creates test cases same time on multiple
cases by recording using elements locators. machines.
testers interactions
with the browser.

Selenium for Salesforce Automation | 8


The advantages of Selenium
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 many browsers; it supports several


operating systems, and it works with multiple programming
languages. This means it integrates well with many business systems.

Because it is open sourced it 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

Selenium for Salesforce Automation | 9


The disadvantages of Selenium
While Selenium has many advantages, it also lacks several
functionalities to make it the ultimate test automation tool.

First, Selenium only allows you to test web applications – not mobile
or desktop. Useful functionalities such as reporting, and data-driven
testing are 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 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, they must be maintained. 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 is a headache.

An example of the error message you may


find in your Selenium script after it has run
for a couple of weeks

Selenium for Salesforce Automation | 10


More than half of testers have difficulties automating
their QA and testing processes

Sixty-eight percent to be precise, On top of that, 46% of enterprises


according to Capgemini’s most find it difficult to find skilled and
recent report on Quality. As a result, experienced test automation
only 14-18% use automation actively, resources.
despite the technology and tools
being available for more than 15
years.

34% of QA teams say they are lacking software


development engineering testing skills.”
- Capgemini World Quality Report 2020-21

Aside from setting up and maintaining the script, you’ll also need to
make sure that your code ‘speaks’ with the rest of the release pipeline.
This means that as a tester need to know the code versioning used in
your Git repository.

Although the Selenium community may be able to help with some


coding tasks, testing teams cannot always rely on this support for
larger enterprise projects due to the necessity for privacy and quick
resolution time.

Additionally, maintaining a Selenium Grid is a significant and time-


consuming task. It involves continuous monitoring as well as upgrading
and patching. Not only for specific browser versions, but also the OS
they are running on.

Selenium for Salesforce Automation | 11


Overall, creating a fast and efficient test automation ecosystem based
on Selenium is a time-consuming task that requires highly skilled
testers to set up and maintain.

In sum, the disadvantages of


Selenium are:
− It’s difficult to set up and use, potentially
leading to high start-up costs

− It’s difficult to maintain


− Slow test development as all test cases
needs to be scripted

− It only supports web browsers, not


mobile and desktop

− Integration with the rest of the pipeline


is difficult

− No dedicated support, only user


communities

− Requires third party solutions to cover


all testing needs

Selenium for Salesforce Automation | 12


Searching for an alternative
test automation tool:
what to consider

There are a vast number of tools and testing frameworks available for
test automation, and there might be a tool that serves your needs in
Salesforce better than Selenium.

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 trackable, capturing why


test cases fail in recorded
Is it easy-to-use, Is it adaptable, working videos and logs?
enabling testers across all web, mobile
to set up test and desktop apps and
cases from day technologies?
one?
Is it supported, providing you
with the help you need, when
you need it?

Is it code-free, enabling all Is it able tvo fully support an


testers to set up and automated release pipeline
understand test cases? without requiring additional
coding effort?

Is it collaborative,
Is it visual, providing you
allowing your team to
with a good overview of
work together on the
your test suite?
software?

Selenium for Salesforce Automation | 13


We see a trend towards wanting QA engineers
who have developer type skills, who yet retain
their quality mindset and business-cum-user
centricity. Is this expecting too much? Yes, we
think so. Only a few QA professionals can have all
these skills in their repertoire.”
- Capgemini World Quality Report 2020-21

At the core of the obstacles testers face in adopting


automation lies in user-friendliness

As Capgemini notes in their 2020-21 Visual, no-code automation tools are


World Quality Report, there is now a good starting point as their user-
an increasing number of tools and friendly nature lets testers get started
solutions which help testers overcome quickly and with ease.
these obstacles.

A codeless version of Selenium is, to many testers, a far more ideal


user experience. This is why codeless automation tools have grown in
popularity as they relieve many headaches for software testing teams.
For example, a tester who wants to automate testing in Salesforce with
Selenium must first learn a programming language such as Python,
Java, or C#.

On top of that, Selenium isn’t exactly an intuitive tool, and you can’t
get any 1:1 support. You must either take a course in Selenium, have a
go at Selenium’s user documentation, reach out to the community for
answers, or take a good old-fashioned learning-by-doing approach.

Selenium for Salesforce Automation | 14


50% of testers say they don’t have the right tools.”
- Capgemini World Quality Report 2020-21

In contrast, codeless test automation allows 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 more easily maintain scripts, as they’ll have a clearer overview of
the steps and can detect if changes need to be made...

In the image below, you’ll see an image of a Leapwork automation


flow for Salesforce. Flows like these take no more than a day to learn
how to set up. Once you’re familiar with the tool, the drag and drop
building blocks take minutes to organize. This means you can set up,
execute and maintain your test suite in a fraction of the time.

Start Read Excel contacts Create in Salesforce Validate contact Success


Source file Contact name Name
Contacts.xslx Company James , Tom

Contact source Akin , Kristen


Full name
Cotton , Phyllis
Company Salesforce link
Link
Contact source
Connected
Expand
Expand

Selenium for Salesforce Automation | 15


Test automation tools for
Salesforce: a comparison

When looking for a way to test Salesforce integrations and


connections you will probably come across a few options. The most
popular starting point for many is Selenium because it is free and
readily available.

If you too are considering using Selenium to test Salesforce, or if


you’ve already chosen Selenium but you’ve subsequently found that it
doesn’t meet your needs, you’ve come to the right place.

Below is a complete overview of what you can expect from Selenium


in terms of usability, adoption, documentation, governance, test
execution and integrations.

Use the Selenium column to see what Selenium can and cannot do
and compare it to the Leapwork column to find out if a no-code
platform might be a better solution for you.

Selenium for Salesforce Automation | 16


Common Salesforce testing challenges

Selenium WebDriver Leapwork

With frames, UI automation needs to With Leapwork, smart visual


Navigating through identify the elements under the frame. recognition only requires a single click
frames With Selenium, you’ll need to spend to switch between frames.
hours on a script that might break.

Requires a vast understanding of the Its locator strategy allows dynamic web
Executing against Salesforce DOM, Parent-Child, and elements to be efficiently identified,
dynamic content Root-Ancestor hierarchies. with the option to tweak or change the
chosen strategy as required.

It requires a code-based approach Utilizes a row/table column-based


to locate rows and columns by their strategy that handles the complex
Handling tables
X-path. tables in Salesforce out of the box.

Object repositories need to be built It is automatically maintained in


from scratch so that dependencies can Leapwork, complete with an oversight
Object dependency
be supported. This requires a lot of of the objects used for a flow.
groundwork and maintenance.

Handling Shadow DOM elements Elements are automatically


Heavy DOM isn’t supported with the Selenium API, captured within the DOM structure
structure and and so a workaround is required. This (including shadow DOMs). Timeouts
shadow DOMs custom coding usually needs to be automatically ensure synchronisation,
updated with each release. and can be increased if needed.

A lot of effort is needed to support The same use case can be executed
data-driven testing. For example, using for multiple Salesforce users with input
Driving data Excel requires writing functions and from spreadsheets, databases, and
parameterizing to avoid hard coded web services.
values in your scripts.

While you can always re-use parts of Tests can run smoothly despite frequent
an existing Selenium script, figuring updates, thanks to reusable cases,
Reusability out how to save, name, maintain, and visual debugging capabilities, and
share this work is complex and time- video-based reporting.
consuming.

Selenium for Salesforce Automation | 17


Common Salesforce
Selenium WebDriver Leapwork
testing challenges

Selenium is only for web-testing, so Leapwork’s smart recording, including


cannot execute cross-technology test recording sub-flows, enables
Long steps for
cases that include, say, Salesforce and automation of end-to-end, cross-
end-to-end testing
a desktop application. technology use cases within a matter of
minutes.

Usability and adoption


Selenium WebDriver Leapwork

Can only be used by programmers, Can do the exact same thing with easy-
who get low-level access to browser to-use building blocks, and without
Programming behavior and actions through using any having to read or write a single line of
needed programming language (C#, Java, code. Perfect for non-technical users
Python, PHP, etc). – or anyone who just doesn’t want to
spend time on programming.

No enterprise support exists, the On-demand live support from


Enterprise
Selenium project is run by the open automation specialists.
support
source community.

Data-driven automation requires Data-driven automation is included


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

Uses highly complex CSS or XPath Point and click to capture any web
Finding web “selectors”, which require deep technical element. Smart algorithms then
elements knowledge. automatically find the best way to
locate it again in the future.

A good ecosystem and lots of code All users have access to a


samples exist on the internet for comprehensive learning center with
Training
professional programmers to use. many hours of free videos. Enterprise
materials
users can participate in a professional
certification program.

Selenium for Salesforce Automation | 18


Usability and
Selenium WebDriver Leapwork
adoption

Typically takes 3-6 months for an initial Max. 3 months, using a structured
Speed of
project, then another 6-12 months for learning and on-boarding program.
adoption
framework programming.

Governance, compliance, and documentation


Selenium WebDriver Leapwork

Reporting and dashboards are included


No reporting or dashboard solution is
Reporting and out of the box. Results can also be
included. Programmers can custom-
dashboards integrated with PowerBI, JIRA, and
build their own reporting framework.
more.

Locked,
Not available Available
tamper-proof flows

Video recording is not included and is Everything is automatically recorded on


very difficult to achieve, even with a video, and a retention policy can ensure
Automatic custom-built solution. Programmers are old videos are automatically deleted
video recording typically limited to saving screenshots if necessary. Most importantly, critical
with no retention policy. records are kept safe in tamper-proof
audit trails.

An object repository is not included, but All assets such as web element locators
programmers can custom-build their and flows are structured and stored in
own and decide on implementing code an encrypted database with built-in
patterns such as Page Object Model. version history.
Object repository
and version history
Version history can be achieved using
source control systems such as Git,
which most non-technical users find
impossible to navigate.

No access control is included and is Access control, both locally in the


Access control difficult to achieve with a custom-built encrypted database and through
solution. Active Directory, is included.

Selenium for Salesforce Automation | 19


Test execution and integrations

Selenium WebDriver Leapwork

No scheduler is included. Programmers Scheduling and ad-hoc running is


can use a unit-test framework in included out of the box. Flows can also
Scheduling
combination with a custom-built be triggered from a build pipeline or
scheduler or build pipeline. other third-party system.

Can run in distributed, parallel Can run in distributed, parallel


environments, but requires environments out of the box, including
programmers to build a custom on BrowserStack, Sauce Labs and
Parallelization automation framework. Selenium Grid as well as on Leapwork
agents, where web, desktop and
virtual applications can be automated
together.

A full-fledged REST API is included out


No REST API is included, but the
of the box, making it easy for DevOps
Built-in REST WebDriver wire protocol is open source,
to integrate with any third-party
API and custom-built REST APIs can be
system.
made by programmers.

Any CI/CD platforms can be used All popular CI/CD platforms can easily
by custom-built solutions. A good be integrated by DevOps using plugins
Built-in CI/CD
ecosystem and lots of code samples or the REST API.
plugins
exist on the internet for professional
programmers to use.

Codeless automation for Salesforce, and beyond


Tell us your use case and let us show you what Leapwork
can do, or start a trial to experience the simplicity of our
universal, visual automation language immediately.

Book demo Start trial

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy