Testing Salesforce Applications
Let's learn how to test Lightning Experience and the Salesforce mobile app using page objects provided by Salesforce.
Downloads
Salesforce page objects artifacts are published in:
- Maven for Java.
To find the latest version compatible with the current production Salesforce release, see the dependency in the utam-java-recipes repo.
- npm for JavaScript.
To find the latest version of the artifact, see the README in npm or the dependencies in the utam-js-recipes repo. For example, the npm artifact README indicates compatibility with the supported Salesforce release.
UTAM compiler and core versions compatible with the page objects artifact can be found in pom.xml or package.json of the recipes repositories, for example:
<utam.framework.version>1.0.15</utam.framework.version>
"wdio-utam-service": "1.0.2"
How to Use Salesforce Page Objects
From a browser, to find which page object to use, see here.
Inventory of Salesforce Page Objects
The only way to get a full list of published Salesforce page objects is to download the Javadoc jar file, unpack it, and view the Javadoc in your browser. Even if you are using generated JavaScript files, the Javadoc HTML pages are useful because the classes and methods are the same.
To download the Javadoc jar file:
- In Maven Central, search for the artifact using the keyword "utam".
- Pick the
salesforce-pageobjects
artifact and click on the version that you're using. - Click the
Downloads
link and selectjavadoc.jar
. - Unpack
javadoc.jar
locally (jar xf ./path/to/salesforce-pageobjects-${version}-javadoc.jar
) and openindex.html
in your browser. - To use the Javadoc to find what you need, see here.
How to write UI tests for Salesforce App
We provide examples of UI tests in our recipes repositories: