A Page Object in Functionize is a reusable collection of actions that represent a specific webpage element or component of your application. Instead of re-recording the same steps across multiple tests, you can create Page Objects once and reuse them throughout your test cases.
Creating a Page Object with Architect is nearly identical to recording a standard test case. The key difference is selecting Page Object as the Test Type when saving.
Prerequisites
- Architect plugin must be installed in the Chrome browser.
- A valid application URL for the page you want to model.
- Non-production credentials (Functionize does not allow production credentials in test recordings).
Steps to Create a Page Object
Step 1: Begin the Process
- Click New Test > Architect in the upper-right corner of the screen.
- Enter the Starting URL of the application page you want to model.
Step 2: Launch Architect
- Confirm Understanding: Check the box acknowledging that production credentials must not be used.
- Click Start to launch Architect.
- The application under test will open.
- Architect will attach to the session and prepare for recording.
Step 3: Record Actions
- Interact with the page normally.
- Architect will automatically record your actions, including clicks, inputs, and navigations.
- Keep actions focused and modular since Page Objects are meant to be reusable across tests.
Step 4: Save the Recording
- Once finished, click Save.
- Provide a clear, descriptive name for the Page Object.
- Click Continue.
Step 5: Define as Page Object
- In the Test Type dropdown, select Page Object.
- Confirm the Page Object name.
- Add notes to document the purpose or function of the Page Object (optional).
- Click Save.
Step 6: Verify and Use the Page Object
- Navigate to the Page Object tab on the Test Listing page.
- Locate the saved Page Object in the list, using the search feature if needed.
- Add this Page Object to any test case to reuse the recorded steps.
Notes & Best Practices
- Naming Conventions: Use meaningful names (e.g., Login Page, Shopping Cart, User Profile Header) so teams can easily identify and reuse Page Objects.
- Keep Actions Modular: Record only the steps specific to that page or component. Avoid mixing unrelated flows.
- Versioning: If your application UI changes, update the Page Object once instead of editing multiple tests.
- Reusability: Page Objects can be combined with other Page Objects or additional test actions to build complex end-to-end scenarios.
Summary
Page Objects streamline test creation and maintenance by encapsulating reusable actions for specific application pages or components. With Architect, recording a Page Object is straightforward: record actions, save as a Page Object, and then reuse it across multiple tests. This ensures consistency, reduces duplication, and improves long-term test scalability.