Instructions

Shadow DOMs
Salesforce uses Shadow DOMs to isolate
components. This makes it difficult to identify
elements in UI test automation.
Heavy DOM structure
Salesforce’s DOM structure is heavy with
a complex tree structure. This means that
automation tools will need more time to
access them.
Element identifiers are hidden
Usually, a UI automation tool will need
element details to identify visual elements
in the application. Salesforce hides these
for development purposes, making test
automation difficult.
Dynamic elements
UI elements that change with every test
script run can be a real burden. Without an
element locator strategy, maintenance of
Salesforce tests will become a major time
sink with every test run.
Iframes
In Salesforce, a new tab is a new frame.
These frames are difficult to identify because
the UI automation tool needs to identify the
elements under the frame. This can be difficult
to automate with a script-based tool like
Selenium and you’ll need to add that script
logic in yourself, a task only for experienced
Selenium testers.
Custom pages in Salesforce
Salesforce has frameworks like Visualforce,
Aura, apex and Lightning Web Components.
These allow developers to develop their own
custom pages on top of Salesforce Lightning.
But with every release, the likelihood that
customization will break increases.
Lightning and Classic
Most Salesforce customers have moved their
environment to Salesforce Lightning. However,
there are a few who are still using the Classic
version. Testing both versions can be a
nightmare for automation tools.
These challenges, however, can be overcome
with the right tool.
Salesforces heavy DOM structure
Salesforce Automation Guide 11