Salesforce Page Objects provides pre-built page objects for testing Salesforce Lightning Experience applications using the UI Test Automation Model (UTAM) framework. This package, currently at stable version 12.0.0, is directly provided by Salesforce and is compatible with the Spring’26 Salesforce release, ensuring alignment with the latest platform features. It is designed to work with the `wdio-utam-service` (specifically versions 3.0.0-3.3.0 for web, and 3.0.0-3.2.2 for mobile) to facilitate robust UI testing. The library offers a structured way to interact with Salesforce UI components, abstracting the underlying DOM for more resilient and maintainable tests. Its release cadence is tied to Salesforce platform releases, providing updated page objects as the platform evolves, differentiating it from community-maintained alternatives by offering official, curated test components.
npm install salesforce-pageobjectsVerified import paths — ran on the pinned version, not inferred.
Demonstrates importing the Login page object, instantiating it with UtamLoader, and performing basic interactions like field existence checks and logging in.
Upgrade your Node.js development and execution environment to version 18 or a later compatible version.
Ensure your `wdio-utam-service` dependency matches the specified compatible version range to avoid runtime issues with page object loading and interaction.
Align your `salesforce-pageobjects` package version with your Salesforce org's current release. Regularly check for package updates corresponding to new Salesforce releases.
Verify the exact import path, including case sensitivity. Ensure `salesforce-pageobjects` is installed via `npm install salesforce-pageobjects` and is accessible in your project's `node_modules`.
Ensure `UtamLoader.load(Login)` is used to create the page object instance. Double-check the method name against the UTAM page object definition or documentation for `Login`.
Confirm that your `salesforce-pageobjects` version matches your Salesforce org's release. If the problem persists, inspect the element using browser developer tools to verify its presence and attributes, or await a package update with refreshed locators.