---
title: "Customising Page Objects"
slug: "customising-page-objects"
description: "Learn how to customise and Edit Page Objects that exist within Test Modeller Generated using the UI Scanner."
tags: ["Test Modeller", "Feature Overviews"]
updated: 2024-09-27T15:06:22Z
published: 2024-09-27T15:06:22Z
canonical: "knowledge.curiositysoftware.ie/customising-page-objects"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.curiositysoftware.ie/llms.txt
> Use this file to discover all available pages before exploring further.

# Customising Page Objects

Learn how to customise and Edit Page Objects that exist within Quality Modeller (Generated using the UI Scanner).

**Use cases:**to embed Custom Code to a previous scanned UI or maybe **(1a)** to add Custom Code to an Auto-generated Object **(2b)**to edit Auto-generated code.

[Embedded content](https://www.youtube.com/embed/D0r6iYPv1oc?&amp;wmode=opaque&amp;rel=0)

**Part 1a:** Add a Custom Function

**Dependency:** First Add some Auto-generated Code. In the sidebar menu click Models (new UI it’s called: Explorer) > Select and open the required Module Object > click New Function button > in the New Function pane name the function (Object) > in Function Type choose Custom Code.

**Tab options:**Add Parameters | Select a Return (empty = Void) | Give the function type (Custom Code) > In the example, the function added is AssertPDF

***Function Types:***

- ***Embedded Code -**embeds inside a Test Script*
- ***Custom Code**-****a function inside a Page Object*

**Next:** Hit Save > (see that AssertPDF has been added). Hit Regenerate > Open the Java download file (see that the AssertPDF function is present in the code.)

At any time, Parameters | Return | Code | Traceability can be edited. To do so, click the pencil (edit icon on the corresponding asset row).

**Part 1b:**Edit Auto-generated Code

In the example, Click_Create_an_Account is edited with Custom lines.

Hit the pencil (edit icon on the corresponding asset row) > In the Edit Function pane, switch the Function Type from Page Object to Custom Code. Click the Code tab > modify code and Save. Hit Regenerate again > Open the Java download file (see that the AssertPDF function is present in the code.

Quality Modeller is Curiosity's flow-driven model-based tool which provides a range of accelerators and connectors for building flowcharts rapidly. Align all stakeholders to quality outcomes and create critical assets early, delivering superior software at speed.

Quality Modeller has a UI Scanner which can be downloaded as a Browser Extension and be used to quickly scan and create models from web pages. The UI Scanner creates page object models at the click of a button. The page objects can then be called from models in Modeller, quickly and simply automating the test cases associated with that model.

## Related

- [Quality Modeller 101](/test-modeller-101.md)
