Error Codes

The UTAM compiler generates Java or JavaScript page objects from source JSON page objects. If the compiler encounters an error in a JSON page object, it emits an error code and an error message.

To combine all compilation errors into one report and throw an error at the end, set the interruptCompilerOnError option to false in the compiler configuration file. For information about the compiler configuration options, see:

Here's the list of error codes.

This property isn't supported. For a list of supported page object properties, see the JSON Grammar.

Incorrect JSON example:

Error message:

This property isn't supported. The set of supported properties is listed in the error message.

Incorrect JSON example:

Error message:

A required property is missing.

Incorrect JSON example:

Error message:

This property isn't supported. An alternative property is suggested in the error message.

Incorrect JSON example:

Error message:

This array can't contain a member with an empty string.

Incorrect JSON example:

Error message:

This property must be set to a non-empty array.

Incorrect JSON example:

Error message:

This object can't be empty.

Incorrect JSON example:

Error message:

The arguments are incorrectly formatted. See Supported Argument Types.

Incorrect JSON example:

Error message:

An unknown element is referenced as an argument. Check that the elementReference in the args array corresponds to a defined element.

Incorrect JSON example:

Error message:

An argument is using an unsupported literal argument type. This example uses a number (1.024) but only integers are supported. See Supported Argument Types.

Incorrect JSON example:

Error message:

An argument is using an unsupported argument type. See Supported Argument Types.

Incorrect JSON example:

Error message:

A function argument type requires a predicate property and it's missing or incorrectly formatted. See Supported Argument Types.

Incorrect JSON example:

Error message:

Literal arguments aren't allowed in this context. Use a name property instead of a value property. See Supported Argument Types.

Incorrect JSON example:

Error message:

An argument is using an incorrect elementReference format. See Element Reference.

Incorrect JSON example:

Error message:

A duplicate argument name is defined. Look for duplicate argument names.

Incorrect JSON example:

Error message:

There's a mismatch in the expected number of arguments.

Incorrect JSON example:

Error message:

An argument has an incorrect type. See Supported Argument Types.

Incorrect JSON example:

Error message:

A selector has an unknown parameter type. See Selector Parameters.

Incorrect JSON example:

Error message:

An argument can only define either a "name" or "value" property. See Supported Argument Types. Incorrect JSON example:

Error message:

An argument with a "name" property also requires a "type" property. See Supported Argument Types.

Incorrect JSON example:

Error message:

An argument must have either a "name" or "value" property. See Supported Argument Types.

Incorrect JSON example:

Error message:

A literal or function argument doesn't support a description property.

Incorrect JSON example:

Error message:

An invalid basic element type is defined. See Basic Element.

Incorrect JSON example:

Error message:

A duplicate basic type is defined.

Incorrect JSON example:

Error message:

An element is incorrectly formatted. See Basic Element.

Incorrect JSON example:

Error message:

An incorrect element type is defined. A custom type must contain alphanumeric characters only with the schema [package-name]/[custom/path]/pageObject.

Incorrect JSON example:

Error message:

A duplicate element with the same name is defined.

Incorrect JSON example:

Error message:

A frame selector can't set a returnAll property to true.

Incorrect JSON example:

Error message:

Only a basic element can have nested elements or a shadow root.

Incorrect JSON example:

Error message:

The load property is not supported for elements with arguments or container type elements.

Incorrect JSON example:

Error message:

An element filter is incorrectly defined. See Element Filter.

Incorrect JSON example:

Error message:

An unknown action is defined for a basic element.

Incorrect JSON example:

Error message:

A filter can only be set for a list element. See List and Index.

Incorrect JSON example:

Error message:

An unsupported action is defined for this element type. See Basic Element.

Incorrect JSON example:

Error message:

An interface is incorrectly defined. Declare an interface's API as an array of objects in the methods property. See Interfaces.

Incorrect JSON example:

Error message:

Reserved for future use.

A returnAll property can't be set in an interface without setting a returnType property. See Interfaces.

Incorrect JSON example:

Error message:

An unsupported returnType property for an interface was defined. See Interfaces.

Incorrect JSON example:

Error message:

The compose method is incorrectly formatted. See Compose Method.

Incorrect JSON example:

Error message:

An argument at the method level can't have an argumentReference type. See Argument Reference.

Incorrect JSON example:

Error message:

An argumentReference is used but there's no matching argument defined at the method level. See Argument Reference.

Incorrect JSON example:

Error message:

A declared argument is never used.

Incorrect JSON example:

Error message:

A duplicate method name is declared. This can be fixed by renaming one of the methods.

Incorrect JSON example:

Error message:

The name of a method will duplicate the name of a generated method.

In the example below, the compiler will generate a helper function for the test element named waitForTest. Because there is a declared method with the same name, an error is thrown. To fix this, rename the element or the method.

Incorrect JSON example:

Error message:

The compose statement is incorrectly formatted. See Compose Method.

Incorrect JSON example:

Error message:

A compose statement references an unknown element.

Incorrect JSON example:

Error message:

A compose statement is using an unsupported returnType property. See Method Return Types.

Incorrect JSON example:

Error message:

A compose statement with a returnAll property must also have a returnType property. See Compose Method.

Incorrect JSON example:

Error message:

The return type for element can't be inferred. Please add a returnType property.

Incorrect JSON example:

Error message:

An element property is redundant because it's a chain statement. See Chain Compose Statements.

Incorrect JSON example:

Error message:

Only a document or root element is allowed in a beforeLoad statement. See beforeLoad.

Incorrect JSON example:

Error message:

A "returnSelf" statement can only be invoked from the last statement. See returnSelf statement.

Incorrect JSON example:

Error message:

A compose method must define either an element, apply, or applyExternal property. See Compose Method and Imperative Extensions.

Incorrect JSON example:

Error message:

A compose method can define either an apply or applyExternal property, but not both. See Compose Method and Imperative Extensions.

Incorrect JSON example:

Error message:

A compose statement that uses an applyExternal property can't also use element or apply properties.

Incorrect JSON example:

Error message:

This method isn't supported for this basic element type. See Basic Actions.

Incorrect JSON example:

Error message:

The compose statement has an unexpected returnType property. See Method Return Types.

Incorrect JSON example:

Error message:

Chains are supported only if the previous statement returns a custom type (another page object). See Chain Compose Statements.

Incorrect JSON example:

Error message:

A nested waitFor statement isn't supported. See Explicit Waits.

Incorrect JSON example:

Error message:

The first statement in a compose method can't set chain to true. See Chain Compose Statements.

Incorrect JSON example:

Error message:

This method isn't supported for this element type. See Basic Actions.

Incorrect JSON example:

Error message:

The description property is incorrectly formatted. See Page Object Description.

Incorrect JSON example:

Error message:

The profile property is incorrectly formatted. See Interfaces.

Incorrect JSON example:

Error message:

The profile name is a duplicate. See Interfaces.

Incorrect JSON example:

Error message:

The profile has a duplicate value. See Interfaces.

Incorrect JSON example:

Error message:

The profile isn't configured. Make sure that the profile is in the compiler configuration file. See Interfaces.

Incorrect JSON example:

Error message:

A profile with this name isn't configured. Make sure that the profile is in the compiler configuration file. See Interfaces.

Incorrect JSON example:

Error message:

A profile can only be set for a page object that also sets the implements property. See Interfaces.

Incorrect JSON example:

Error message:

A profile value can either be a string or a non-empty string array. See Interfaces.

Incorrect JSON example:

Error message:

The page object is incorrectly formatted.

Incorrect JSON example:

Error message:

A non-root page object can't have a selector property. Either remove the selector property or add "root": true. See Root Element.

Incorrect JSON example:

Error message:

A root page object requires a selector property. Either add a selector property or remove "root": true. See Root Element.

Incorrect JSON example:

Error message:

The platform property value must be either web or native. See Interfaces.

Incorrect JSON example:

Error message:

The beforeLoad property can't have arguments. See beforeLoad.

Incorrect JSON example:

Error message:

The the root description property is incorrectly formatted. See Page Object Description.

Incorrect JSON example:

Error message:

The selector property is incorrectly formatted. See Element Selector.

Incorrect JSON example:

Error message:

The selector must contain css, accessid, uiautomator, or classchain properties. See Element Selector.

Incorrect JSON example:

Error message:

The root selector can only be one of "css", "accessid", "uiautomator", or "classchain". See Element Selector.

Incorrect JSON example:

Error message:

The selector is using an invalid UiSelector method. See Element Selector.

Incorrect JSON example:

Error message:

The classchain property in the selector is using unsupported quotes. See Element Selector.

Incorrect JSON example:

Error message:

The classchain property in the selector can set only one of the supported operators. See Element Selector.

Incorrect JSON example:

Error message:

The elements property inside shadow is incorrectly formatted. See Root Element.

Incorrect JSON example:

Error message:

The matcher property is incorrectly formatted. See Matchers.

Incorrect JSON example:

Error message:

The filter matcher type isn't supported. See Matchers.

Incorrect JSON example:

Error message:

The apply method returns a type that's incompatible with the matcher. See Matchers.

Incorrect JSON example:

Error message: