---
schema_version: "1"
id: 4615d7a7f621e8de20ea86d9d948e74acdb11c2763035de33abadbe9ee43ead5
title: Error Codes
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lwc/utam/references/error-codes.md
canonical_url: https://developer.salesforce.com/docs/platform/utam/references/utam-grammar/error-codes.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bfe2be06d4cac49561a8012e3057467dbfbd573274373436b81da41b303c2ece
products:
  - UI Test Automation Model
  - lwc
---
# 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:

- [JavaScript compiler configuration file](/docs/platform/guide/js-guide.html#compiler-setup)
- [Java compiler configuration file](/docs/platform/guide/java-guide.html#compiler-setup)

Here's the list of error codes.

## Error Code 7

This property isn't supported. For a list of supported page object properties, see the [JSON Grammar](/docs/platform/utam/references/utam-grammar/grammar.html).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "testNestedArgs",
      "compose": [
        {
          "element": "self",
          "apply": "unknownMethod",
          "args": [
            {
              "value": "string",
              "args": [
                {
                  "value": "not allowed"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 7: method "testNestedArgs" statement "unknownMethod": property "args" is not supported
```

## Error Code 8

This property isn't supported. The set of supported properties is listed in the error message.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": { "css": "css" },
      "type": "frame",
      "nullable": true
    }
  ]
}
```

**Error message**:

```text
error 8: element "test": property "nullable" is not supported, supported are: name, public, selector, type
```

## Error Code 9

A required property is missing.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test"
    }
  ]
}
```

**Error message**:

```text
error 9: element "test": property "selector" is required
```

## Error Code 10

This property isn't supported. An alternative property is suggested in the error message.

**Incorrect JSON example**:

```json
{
  "description": ""
}
```

**Error message**:

```text
error 10: page object description: property "text" should be a non-empty string, instead found empty
```

## Error Code 11

This array can't contain a member with an empty string.

**Incorrect JSON example**:

```json
{
  "profile": [
    {
      "name": [1]
    }
  ]
}
```

**Error message**:

```text
error 11: profile "name": array member should be a non-empty string, instead found number
```

## Error Code 12

This property must be set to a non-empty array.

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": []
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 12: method "test": property "args" should be a not empty array
```

## Error Code 13

This object can't be empty.

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [true]
    }
  ]
}
```

**Error message**:

```text
error 13: method "test": compose statement should be a non-empty object
```

## Error Code 100

The arguments are incorrectly formatted. See [Supported Argument Types](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [
            {
              "value": true,
              "type": "string"
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 100: method "test" arguments: incorrect argument format
```

## Error Code 101

An unknown element is referenced as an argument. Check that the `elementReference` in the `args` array corresponds to a defined element.

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [
            {
              "value": "argName",
              "type": "elementReference"
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 101: method "test" arguments: unknown element with name "argName" is referenced
```

## Error Code 102

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](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [
            {
              "value": 1.024
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 102: method "test" arguments: unsupported literal argument type "1.024"
```

## Error Code 103

An argument is using an unsupported argument type. See [Supported Argument Types](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [
            {
              "type": "elementReference"
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 103: method "test" arguments: unsupported argument type "elementReference"
```

## Error Code 104

A function argument type requires a `predicate` property and it's missing or incorrectly formatted. See [Supported Argument Types](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [
            {
              "name": "name",
              "type": "function"
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 104: method "test" arguments: incorrect predicate format
```

## Error Code 105

Literal arguments aren't allowed in this context. Use a `name` property instead of a `value` property. See [Supported Argument Types](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "args": [
        {
          "value": "string literal"
        }
      ],
      "compose": [
        {
          "element": "root"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 105: method "test" arguments: literal arguments are not allowed
```

## Error Code 106

An argument is using an incorrect `elementReference` format. See [Element Reference](/docs/platform/utam/references/utam-grammar/methods.html#element-reference).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [
            {
              "value": "myElement",
              "type": "elementReference",
              "predicate": []
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 106: method "test" arguments: incorrect format of elementReference argument
```

## Error Code 107

A duplicate argument name is defined. Look for duplicate argument names.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "element",
      "selector": {
        "css": "selector %s",
        "returnAll": true,
        "args": [
          {
            "name": "arg1",
            "type": "string"
          }
        ]
      },
      "filter": {
        "apply": "getAttribute",
        "args": [
          {
            "name": "arg1",
            "type": "string"
          }
        ],
        "matcher": {
          "type": "stringContains",
          "args": [
            {
              "name": "arg1",
              "type": "string"
            }
          ]
        }
      }
    }
  ]
}
```

**Error message**:

```text
error 107: element "element" arguments: argument with name "arg1" is already declared
```

## Error Code 108

There's a mismatch in the expected number of arguments.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "css": "selector",
        "returnAll": true
      },
      "type": "my/page/object",
      "filter": {
        "apply": "getText",
        "matcher": {
          "type": "isTrue",
          "args": [
            {
              "name": "arg",
              "type": "string"
            }
          ]
        }
      }
    }
  ]
}
```

**Error message**:

```text
error 108: element "test" filter matcher arguments: expected number of arguments is 0, found 1
```

## Error Code 109

An argument has an incorrect type. See [Supported Argument Types](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "apply": "waitFor",
          "args": [
            {
              "type": "function",
              "predicate": [
                {
                  "element": "root",
                  "apply": "isPresent"
                }
              ]
            },
            {
              "value": true
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 109: method "test" arguments: argument "true" has incorrect type, expected "literal string", found "Boolean"
```

## Error Code 110

A selector has an unknown parameter type. See [Selector Parameters](/docs/platform/utam/references/utam-grammar/element-selectors.html#selector-parameters).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "public": true,
      "selector": {
        "css": "str[%f]",
        "args": [
          {
            "name": "num",
            "type": "number"
          }
        ]
      }
    }
  ]
}
```

**Error message**:

```text
error 110: element "test" selector arguments: unknown selector parameter type "%f", only string and number are supported
```

## Error Code 111

An argument can only define either a "name" or "value" property. See [Supported Argument Types](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).
**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [{ "value": "true", "name": "name" }]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 111: method "test" arguments: either "name" or "value" is supported for an argument, not both
```

## Error Code 112

An argument with a "name" property also requires a "type" property. See [Supported Argument Types](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [
            {
              "name": "name"
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 112: method "test" arguments: "type" is required for an argument "name"
```

## Error Code 113

An argument must have either a "name" or "value" property. See [Supported Argument Types](/docs/platform/utam/references/utam-grammar/arguments.html#argument-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "world",
          "apply": "setText",
          "args": [
            {
              "type": "string"
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 113: method "test" arguments: either "name" or "value" is required for an argument
```

## Error Code 114

A literal or function argument doesn't support a `description` property.

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "apply": "waitFor",
          "args": [
            {
              "type": "function",
              "description": "redundant",
              "predicate": [
                {
                  "element": "root"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 114: method "test" arguments: property "description" is not supported for literal or function argument
```

## Error Code 115

An invalid basic element type is defined. See [Basic Element](/docs/platform/utam/references/utam-grammar/page-object-elements.html#basic-elements).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "type": ["wrong"],
      "selector": {
        "css": "css"
      }
    }
  ]
}
```

**Error message**:

```text
error 115: element "test" type: basic type "wrong" is not supported, valid values are: actionable, clickable, draggable, editable, touchable
```

## Error Code 116

A duplicate basic type is defined.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "type": ["clickable", "clickable"],
      "selector": {
        "css": "css"
      }
    }
  ]
}
```

**Error message**:

```text
error 116: element "test" type: duplicate basic type "clickable", basic type values must be unique
```

## Error Code 200

An element is incorrectly formatted. See [Basic Element](/docs/platform/utam/references/utam-grammar/page-object-elements.html#basic-elements).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "wrong": "test",
      "type": "container"
    }
  ]
}
```

**Error message**:

```text
error 200: root elements: incorrect format of elements
```

## Error Code 201

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**:

```json
{
  "elements": [
    {
      "name": "test",
      "type": "wrong",
      "selector": {
        "css": "css"
      }
    }
  ]
}
```

**Error message**:

```text
error 201: element "test": type "wrong" is not supported, valid values are: custom, container, frame, actionable, clickable, draggable, editable, touchable
```

## Error Code 202

A duplicate element with the same name is defined.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "dupElement",
      "selector": {
        "css": "css"
      }
    },
    {
      "name": "dupElement",
      "selector": {
        "css": "css"
      }
    }
  ]
}
```

**Error message**:

```text
error 202: element "dupElement": element with same name was already declared
```

## Error Code 204

A frame selector can't set a `returnAll` property to `true`.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "css": "css",
        "returnAll": true
      },
      "type": "frame"
    }
  ]
}
```

**Error message**:

```text
error 204: element "test": frame selector cannot have "returnAll" set to true
```

## Error Code 205

Only a basic element can have nested elements or a shadow root.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "one",
      "selector": {
        "css": ".one"
      },
      "elements": [
        {
          "name": "nestedCustom",
          "selector": {
            "css": ".nestedCustom"
          },
          "type": "utam-test/pageObjects/test/componentType",
          "public": true
        }
      ],
      "shadow": {
        "elements": [
          {
            "name": "nestedInsideShadow",
            "selector": {
              "css": ".css"
            }
          }
        ]
      }
    }
  ]
}
```

**Error message**:

```text
error 205: element "test": only basic element can have nested elements or shadow root
```

## Error Code 206

The `load` property is not supported for elements with arguments or container type elements.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "css": "test[%s]",
        "args": [
          {
            "name": "selectorArgs",
            "type": "string"
          }
        ]
      },
      "load": true
    }
  ]
}
```

**Error message**:

```text
error 206: element "test": property "load" is not supported for element with arguments, filter or for container element
```

## Error Code 300

An element filter is incorrectly defined. See [Element Filter](/docs/platform/utam/references/utam-grammar/element-filters.html).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "css": "selector %s",
        "returnAll": true,
        "args": [
          {
            "name": "arg1",
            "type": "string"
          }
        ]
      },
      "filter": {
        "apply": "wrong",
        "args": [
          {
            "name": "arg1",
            "type": "string"
          }
        ]
      }
    }
  ]
}
```

**Error message**:

```text
error 300: element "test" filter: incorrect format of element filter
```

## Error Code 301

An unknown action is defined for a basic element.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "css": "selector %s",
        "returnAll": true,
        "args": [
          {
            "name": "arg1",
            "type": "string"
          }
        ]
      },
      "filter": {
        "apply": "wrong",
        "args": [
          {
            "name": "arg1",
            "type": "string"
          }
        ],
        "matcher": {
          "type": "isTrue"
        }
      }
    }
  ]
}
```

**Error message**:

```text
error 301: element "test" filter: unknown action "wrong" for basic element
```

## Error Code 302

A filter can only be set for a list element. See [List and Index](/docs/platform/utam/references/utam-grammar/element-lists.html).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "css": "css"
      },
      "filter": {
        "apply": "isVisible",
        "matcher": {
          "type": "isTrue"
        }
      }
    }
  ]
}
```

**Error message**:

```text
error 302: element "test" filter: filter can only be set for list
```

## Error Code 303

An unsupported action is defined for this element type. See [Basic Element](/docs/platform/utam/references/utam-grammar/page-object-elements.html#basic-elements).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "type": "touchable",
      "selector": {
        "css": "selector %s",
        "returnAll": true,
        "args": [
          {
            "name": "arg1",
            "type": "string"
          }
        ]
      },
      "filter": {
        "apply": "click",
        "matcher": {
          "type": "isTrue"
        }
      }
    }
  ]
}
```

**Error message**:

```text
error 303: element "test" filter: unsupported action "click" for type "touchable"
```

## Error Code 400

An interface is incorrectly defined. Declare an interface's API as an array of objects in the `methods` property. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "interface": true,
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "root",
          "apply": "getText"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 400: method "test": incorrect format of abstract method
```

## Error Code 401

Reserved for future use.

## Error Code 402

A `returnAll` property can't be set in an interface without setting a `returnType` property. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "interface": true,
  "methods": [
    {
      "name": "test",
      "returnAll": true
    }
  ]
}
```

**Error message**:

```text
error 402: abstract method "test": "returnAll" property can't be set without setting return type
```

## Error Code 403

An unsupported `returnType` property for an interface was defined. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "interface": true,
  "methods": [
    {
      "name": "test",
      "returnType": "container"
    }
  ]
}
```

**Error message**:

```text
error 403: abstract method "test": return type "container" is not supported
```

## Error Code 500

The compose method is incorrectly formatted. See [Compose Method](/docs/platform/utam/references/utam-grammar/methods.html).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "unsupportedProperty": "value",
      "compose": [
        {
          "element": "root"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 500: method "test": incorrect format of compose method
```

## Error Code 501

An argument at the method level can't have an `argumentReference` type. See [Argument Reference](/docs/platform/utam/references/utam-grammar/arguments.html#argument-reference).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "args": [
        {
          "name": "arg1",
          "type": "argumentReference"
        }
      ],
      "name": "test",
      "compose": [
        {
          "apply": "something"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 501: method "test" arguments: parameter "arg1" at method level can't have type "argumentReference"
```

## Error Code 502

An `argumentReference` is used but there's no matching argument defined at the method level. See [Argument Reference](/docs/platform/utam/references/utam-grammar/arguments.html#argument-reference).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "apply": "something",
          "args": [
            {
              "name": "arg1",
              "type": "argumentReference"
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 502: method "test": statement declares a reference to an "arg1" argument, but there is no matching argument at the method level
```

## Error Code 503

A declared argument is never used.

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "args": [
        {
          "type": "string",
          "name": "arg"
        }
      ],
      "name": "test",
      "compose": [
        {
          "apply": "someMethod"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 503: method "test": declared parameter "arg" is never used
```

## Error Code 504

A duplicate method name is declared. This can be fixed by renaming one of the methods.

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "method1",
      "compose": [
        {
          "apply": "someMethod1"
        }
      ]
    },
    {
      "name": "method1",
      "compose": [
        {
          "apply": "someMethod2"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 504: method "method1": method with the same name was already declared
```

## Error Code 505

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**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "css": "div"
      },
      "wait": true,
      "public": true
    }
  ],
  "methods": [
    {
      "name": "waitForTest",
      "compose": [
        {
          "element": "test"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 505: method "waitForTest": the given method name would duplicate the name of a generated helper function for element "test"
```

## Error Code 600

The compose statement is incorrectly formatted. See [Compose Method](/docs/platform/utam/references/utam-grammar/methods.html).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "apply": "returnSelf",
          "element": "document"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 600: method "test" statement: incorrect compose statement format
```

## Error Code 601

A compose statement references an unknown element.

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "test"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 601: method "test" statement: unknown element with name "test" is referenced in a compose statement
```

## Error Code 602

A compose statement is using an unsupported `returnType` property. See [Method Return Types](/docs/platform/utam/references/utam-grammar/method-return-types.html#supported-return-types).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "root",
          "returnType": "container"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 602: method "test" statement: return type "container" is not supported in a compose statement
```

## Error Code 603

A compose statement with a `returnAll` property must also have a `returnType` property. See [Compose Method](/docs/platform/utam/references/utam-grammar/methods.html).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "root",
          "returnAll": true
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 603: method "test" statement: "returnAll" property can't be set without setting return type in a compose statement
```

## Error Code 605

The return type for `element` can't be inferred. Please add a `returnType` property.

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "element",
      "type": "my/pageobject/foo",
      "selector": {
        "css": "css"
      }
    }
  ],
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "element"
        },
        {
          "chain": true,
          "element": "element"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 605: method "test" statement: can't infer return type for "element", please provide a "returnType"
```

## Error Code 606

An `element` property is redundant because it's a chain statement. See [Chain Compose Statements](/docs/platform/utam/references/utam-grammar/methods.html#chain-compose-statements).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "element",
      "type": "my/custom/type",
      "selector": {
        "css": "css"
      }
    }
  ],
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "element"
        },
        {
          "chain": true,
          "element": "element",
          "apply": "method"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 606: method "test" statement: "element" property is redundant because statement is marked as a chain
```

## Error Code 607

Only a `document` or `root` element is allowed in a `beforeLoad` statement. See [beforeLoad](/docs/platform/utam/references/utam-grammar/explicit-waits.html#beforeload).

**Incorrect JSON example**:

```json
{
  "beforeLoad": [
    {
      "element": "test",
      "apply": "getAttribute"
    }
  ]
}
```

**Error message**:

```text
error 607: method "beforeLoad" statement: only "document" or "root" elements are allowed
```

## Error Code 608

A "returnSelf" statement can only be invoked from the last statement. See [returnSelf statement](/docs/platform/utam/references/utam-grammar/methods.html#returnself-statement).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "apply": "returnSelf"
        },
        {
          "apply": "someMethod"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 608: method "test" statement: "returnSelf" can only be invoked from the last statement
```

## Error Code 609

A compose method must define either an `element`, `apply`, or `applyExternal` property. See [Compose Method](https://developer.salesforce.com/docs/platform/utam/references/utam-grammar/methods.md) and [Imperative Extensions](/docs/platform/guide/imperatives.html).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [{}]
    }
  ]
}
```

**Error message**:

```text
error 609: method "test" statement: either "element" or "apply" or "applyExternal" should be defined
```

## Error Code 610

A compose method can define either an `apply` or `applyExternal` property, but not both. See [Compose Method](/docs/platform/utam/references/utam-grammar/methods.html) and [Imperative Extensions](/docs/platform/guide/imperatives.html).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "root",
          "apply": "getText",
          "applyExternal": {}
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 610: method "test" statement: either "apply" or "applyExternal" should be defined"
```

## Error Code 611

A compose statement that uses an `applyExternal` property can't also use `element` or `apply` properties.

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "root",
          "applyExternal": {}
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 611: method "test" utility statement: "element" property is redundant
```

## Error Code 612

This method isn't supported for this basic element type. See [Basic Actions](/docs/platform/utam/references/utam-grammar/basic-actions.html).

**Incorrect JSON example**:

```json
{
  "exposeRootElement": true,
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "apply": "click",
          "element": "root"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 612: method "test" statement: unknown method "click" for basic element
```

## Error Code 613

The compose statement has an unexpected `returnType` property. See [Method Return Types](/docs/platform/utam/references/utam-grammar/method-return-types.html#supported-return-types).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "element",
      "selector": {
        "css": "css"
      },
      "type": ["actionable"]
    }
  ],
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "returnType": "string",
          "element": "element"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 613: method "test" statement: incorrect return type; expected "ElementElement", provided is "String"
```

## Error Code 614

Chains are supported only if the previous statement returns a custom type (another page object). See [Chain Compose Statements](/docs/platform/utam/references/utam-grammar/methods.html#chain-compose-statements).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "element",
      "selector": {
        "css": "css"
      }
    }
  ],
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "element"
        },
        {
          "chain": true,
          "element": "element"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 614: method "test" statement: to use chain, previous statement should return custom type, but it returns "BasicElement"
```

## Error Code 615

A nested `waitFor` statement isn't supported. See [Explicit Waits](/docs/platform/utam/references/utam-grammar/explicit-waits.html).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "apply": "waitFor",
          "args": [
            {
              "type": "function",
              "predicate": [
                {
                  "apply": "waitFor",
                  "args": [
                    {
                      "type": "function",
                      "predicate": [
                        {
                          "apply": "invoke"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 615: method "test" statement: nested waitFor is not supported
```

## Error Code 616

The first statement in a compose method can't set `chain` to `true`. See [Chain Compose Statements](/docs/platform/utam/references/utam-grammar/methods.html#chain-compose-statements).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "element": "root",
          "chain": true
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 616: method "test" statement: first statement can't be marked as chain
```

## Error Code 617

This method isn't supported for this element type. See [Basic Actions](/docs/platform/utam/references/utam-grammar/basic-actions.html).

**Incorrect JSON example**:

```json
{
  "type": ["editable"],
  "methods": [
    {
      "name": "test",
      "compose": [
        {
          "apply": "click",
          "element": "root"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 617: method "test" statement: unsupported action "click" for type "Editable"
```

## Error Code 700

The `description` property is incorrectly formatted. See [Page Object Description](/docs/platform/utam/references/utam-grammar/descriptions-metadata.html#page-object-description).

**Incorrect JSON example**:

```json
{
    "elements",
        [
          {
            "name": "test",
            "description": true,
            "selector": {
                "css": "css"
            }
          }
        ]
}
```

**Error message**:

```text
error 700: element "test" description: format of the description is incorrect
```

## Error Code 800

The `profile` property is incorrectly formatted. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "profile": [{}],
  "implements": "my/pageobjects/type"
}
```

**Error message**:

```text
error 800: profile format is incorrect
```

## Error Code 801

The profile name is a duplicate. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "profile": [
    {
      "name": "value"
    },
    {
      "name": "value"
    }
  ],
  "implements": "my/pageobjects/type"
}
```

**Error message**:

```text
error 801: "profile": duplicate profile name "name"
```

## Error Code 802

The profile has a duplicate value. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
    "profile": [
        {
            "name":
            ["same", "same"]
        }
    ]
    "implements", "my/pageobjects/type"
}
```

**Error message**:

```text
error 802: profile "name": duplicate profile value "same"
```

## Error Code 803

The profile isn't configured. Make sure that the profile is in the compiler configuration file. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "profile": [
    {
      "name": "error"
    }
  ],
  "implements": "my/pageobjects/type"
}
```

**Error message**:

```text
error 803: profile { "name": "error" } is not configured, make sure it's in compiler config
```

## Error Code 804

A profile with this name isn't configured. Make sure that the profile is in the compiler configuration file. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "profile": [
    {
      "name1": "value1"
    }
  ],
  "implements": "my/pageobjects/type"
}
```

**Error message**:

```text
error 804: profile with name "name1" is not configured, make sure it's in compiler config
```

## Error Code 805

A profile can only be set for a page object that also sets the `implements` property. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "profile": [
    {
      "profile": "test"
    }
  ]
}
```

**Error message**:

```text
error 805: "profile" can only be set for a page object that implements an interface
```

## Error Code 806

A profile value can either be a string or a non-empty string array. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "profile": [
    {
      "name": {}
    }
  ],
  "implements": "my/pageobjects/type"
}
```

**Error message**:

```text
error 806: profile "name": values can either be string or non-empty string array
```

## Error Code 900

The page object is incorrectly formatted.

**Incorrect JSON example**:

```json
{
  "error": true
}
```

**Error message**:

```text
error 900: incorrect format of the page object. Unrecognized field "error".
```

## Error Code 901

A non-root page object can't have a `selector` property. Either remove the `selector` property or add `"root": true`. See [Root Element](/docs/platform/utam/references/utam-grammar/root-elements.html).

**Incorrect JSON example**:

```json
{
  "selector": {
    "css": "rootSelector"
  }
}
```

**Error message**:

```text
error 901: non-root page object can't have selector
```

## Error Code 902

A root page object requires a `selector` property. Either add a `selector` property or remove `"root": true`. See [Root Element](/docs/platform/utam/references/utam-grammar/root-elements.html).

**Incorrect JSON example**:

```json
{
  "root": true
}
```

**Error message**:

```text
error 902: root page object requires "selector" property
```

## Error Code 903

The `platform` property value must be either `web` or `native`. See [Interfaces](/docs/platform/utam/references/utam-grammar/interfaces.html).

**Incorrect JSON example**:

```json
{
  "platform": "wibblywobblywonder"
}
```

**Error message**:

```text
error 903: "platform" property: platform should be a string with "web" or "native" value, instead found "wibblywobblywonder"
```

## Error Code 904

The `beforeLoad` property can't have arguments. See [beforeLoad](/docs/platform/utam/references/utam-grammar/explicit-waits.html#beforeload).

**Incorrect JSON example**:

```json
{
  "beforeLoad": [
    {
      "element": "root",
      "apply": "getAttribute",
      "args": [
        {
          "type": "string",
          "name": "str"
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 904: method "beforeLoad" cannot have parameters
```

## Error Code 905

The root `description` property is incorrectly formatted. See [Page Object Description](/docs/platform/utam/references/utam-grammar/descriptions-metadata.html#page-object-description).

**Incorrect JSON example**:

```json
{
  "description": true
}
```

**Error message**:

```text
error 905: format of the root description is incorrect
```

## Error Code 1000

The `selector` property is incorrectly formatted. See [Element Selector](/docs/platform/utam/references/utam-grammar/element-selectors.html).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": "selector"
    }
  ]
}
```

**Error message**:

```text
error 1000: element "test": format of selector is incorrect
```

## Error Code 1002

The `selector` must contain `css`, `accessid`, `uiautomator`, or `classchain` properties. See [Element Selector](/docs/platform/utam/references/utam-grammar/element-selectors.html).

**Incorrect JSON example**:

```json
{
  "root": true,
  "selector": {}
}
```

**Error message**:

```text
error 1002: element "root" selector: one of "css", "accessid", "uiautomator" or "classchain" should be set"
```

## Error Code 1003

The root `selector` can only be one of "css", "accessid", "uiautomator", or "classchain". See [Element Selector](/docs/platform/utam/references/utam-grammar/element-selectors.html).

**Incorrect JSON example**:

```json
{
  "root": true,
  "selector": {
    "css": "css",
    "accessid": "accessid"
  }
}
```

**Error message**:

```text
error 1003: element "root" selector: only one of "css", "accessid", "uiautomator" or "classchain" can be set
```

## Error Code 1004

The `selector` is using an invalid `UiSelector` method. See [Element Selector](/docs/platform/utam/references/utam-grammar/element-selectors.html).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "uiautomator": "new UiScrollable(new UiSelector().scrollable(true)).scrollIntoView(new UiSelector().unsupported())"
      }
    }
  ]
}
```

**Error message**:

```text
error 1004: element "test" selector: unsupported UiSelector method "unsupported", supported methods are checkable, checked, classname, description, descriptioncontains, descriptionstartswith, enabled, selected, resourceid, resourceidmatches
```

## Error Code 1005

The `classchain` property in the selector is using unsupported quotes. See [Element Selector](/docs/platform/utam/references/utam-grammar/element-selectors.html).

**Incorrect JSON example**:

```json
{
  "selector": {
    "classchain": "**/XCUIElementTypeStaticText[\"label == 'something'\"]"
  },
  "root": true
}
```

**Error message**:

```text
error 1005: element "root" selector "label == 'something'": for class chain only one of supported quotes can be set, supported are $,`
```

## Error Code 1006

The `classchain` property in the selector can set only one of the supported operators. See [Element Selector](/docs/platform/utam/references/utam-grammar/element-selectors.html).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "classchain": "**/XCUIElementTypeStaticText[`label=='something'`]"
      }
    }
  ]
}
```

**Error message**:

```text
error 1006: element "test" selector "`label=='something'`": for class chain only one of supported operators can be set, supported are ==,BEGINSWITH,ENDSWITH,CONTAINS,OR,AND
```

## Error Code 1100

The `elements` property inside `shadow` is incorrectly formatted. See [Root Element](/docs/platform/utam/references/utam-grammar/root-elements.html).

**Incorrect JSON example**:

```json
{
  "shadow": {
    "elements": [{}]
  }
}
```

**Error message**:

```text
error 1100: root shadow: incorrect format of elements inside shadow
```

## Error Code 1200

The `matcher` property is incorrectly formatted. See [Matchers](/docs/platform/utam/references/utam-grammar/element-filters.html#matchers).

**Incorrect JSON example**:

```json
{
  "name": "test",
  "selector": {
    "css": ".css",
    "returnAll": true
  },
  "filter": {
    "apply": "getText",
    "matcher": {
      "typemisprinted": "stringEquals"
    }
  }
}
```

**Error message**:

```text
error 1200: element "test" filter: incorrect format of matcher
```

## Error Code 1201

The filter matcher type isn't supported. See [Matchers](/docs/platform/utam/references/utam-grammar/element-filters.html#matchers).

**Incorrect JSON example**:

```json
{
  "elements": [
    {
      "name": "test",
      "selector": {
        "css": ".helloworld",
        "returnAll": true
      },
      "type": "vanilla-js/pageObjects/counter",
      "filter": {
        "apply": "getText",
        "matcher": {
          "type": "invalid"
        }
      }
    }
  ]
}
```

**Error message**:

```text
error 1201: element "test" filter matcher: unsupported matcher type "invalid", supported are isTrue, isFalse, notNull, stringContains, stringEquals
```

## Error Code 1202

The `apply` method returns a type that's incompatible with the `matcher`. See [Matchers](/docs/platform/utam/references/utam-grammar/element-filters.html#matchers).

**Incorrect JSON example**:

```json
{
  "methods": [
    {
      "name": "matcherThrows",
      "compose": [
        {
          "element": "root",
          "apply": "getText",
          "matcher": {
            "type": "isTrue"
          }
        }
      ]
    }
  ]
}
```

**Error message**:

```text
error 1202: method "matcherThrows" statement matcher: applied method returns type "String", which is only compatible with the following matchers - stringContains, stringEquals, notNull
```
