Creating Page Objects

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

  1. Click New Test > Architect in the upper-right corner of the screen.
  2. Enter the Starting URL of the application page you want to model.

Step 2: Launch Architect

  1. Confirm Understanding: Check the box acknowledging that production credentials must not be used.
  2. 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

  1. Interact with the page normally.
  2. 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

  1. Once finished, click Save.
  2. Provide a clear, descriptive name for the Page Object.
  3. Click Continue.

Step 5: Define as Page Object

  1. In the Test Type dropdown, select Page Object.
  2. Confirm the Page Object name.
  3. Add notes to document the purpose or function of the Page Object (optional).
  4. Click Save.

Step 6: Verify and Use the Page Object

  1. Navigate to the Page Object tab on the Test Listing page.
  2. Locate the saved Page Object in the list, using the search feature if needed.
  3. 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.