{"library":"salesforce-pageobjects","title":"Salesforce UI Test Automation Model (UTAM) Page Objects","description":"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.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install salesforce-pageobjects"],"cli":null},"imports":["import Login from 'salesforce-pageobjects/helpers/pageObjects/login';","import AccountHomePage from 'salesforce-pageobjects/helpers/pageObjects/accountHomePage';","const Login = require('salesforce-pageobjects/helpers/pageObjects/login');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import Login from 'salesforce-pageobjects/helpers/pageObjects/login';\nimport { UtamLoader } from 'wdio-utam-service'; // Required for UTAM page object instantiation\n\n// This example typically runs within a WebdriverIO test file or similar testing framework\ndescribe('Salesforce Login Page Test', () => {\n    let loginPage: Login;\n\n    beforeAll(async () => {\n        // 'browser' is assumed to be a global object provided by WebdriverIO\n        await browser.url('https://login.salesforce.com/'); // Navigate to your Salesforce login URL\n        loginPage = await UtamLoader.load(Login); // Instantiate the Login page object\n    });\n\n    it('should display username, password fields and login button', async () => {\n        await expect(loginPage.getUsername()).toBeExisting();\n        await expect(loginPage.getPassword()).toBeExisting();\n        await expect(loginPage.getLoginButton()).toBeExisting();\n    });\n\n    it('should be able to log in with example credentials', async () => {\n        // Replace with actual test credentials or environment variables\n        const username = process.env.SF_USERNAME ?? 'test@example.com';\n        const password = process.env.SF_PASSWORD ?? 'MySecurePassword123!';\n        await loginPage.login(username, password); // Use the page object's login method\n        // Assert navigation to a post-login page or URL\n        await expect(browser).toHaveUrlContaining('lightning.force.com');\n    });\n});","lang":"typescript","description":"Demonstrates importing the Login page object, instantiating it with UtamLoader, and performing basic interactions like field existence checks and logging in.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}