Open topic with navigation

# Edit

# Mobile. Edit

## new Edit(propsopt ) → {Edit}

The description of an EditField test object in a mobile application.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`props` | Object | <optional> | Initializes the description using the supplied property bag.

##### Returns:

the description object that was initialized.

Type
  Edit

### Methods

## accessibilityId(idopt ) → {string|Description}

The accessibility ID of the mobile object.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`id` | string | <optional> | When provided, this method acts as a setter and sets the accessibilityId.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored accessibilityId; otherwise it returns 'this' for use with the builder pattern.

Type
  string | Description

## className(nameopt ) → {string|Description}

The test object class name used by Mobile Center.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | string | <optional> | When provided, this method acts as a setter and sets the className.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored className; otherwise it returns 'this' for use with the builder pattern.

Type
  string | Description

## container(contopt ) → {string|Description}

The container information if the object is in a table (iOS only).

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`cont` | string | <optional> | When provided, this method acts as a setter and sets the container.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored container; otherwise it returns 'this' for use with the builder pattern.

Type
  string | Description

## hint(hintopt ) → {string|Description}

The object's hint.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`hint` | string | <optional> | When provided, this method acts as a setter and sets the hint property value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored hint value; otherwise it returns 'this' for use with the builder pattern.

Type
  string | Description

## index(valueopt ) → {number|Description}

The 0-based index of this object, relative to all other objects with an otherwise identical description.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`value` | number | <optional> | When provided, this method acts as a setter and sets the index to the specified value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored index; otherwise it returns 'this' for use with the builder pattern.

Type
  number | Description

## isCheckable(stateopt ) → {boolean|Description}

Indicates whether the mobile object can be checked.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`state` | boolean | <optional> | When provided, this method acts as a setter and sets the isCheckable value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored isCheckable value; otherwise it returns 'this' for use with the builder pattern.

Type
  boolean | Description

## isChecked(stateopt ) → {boolean|Description}

Indicates whether the mobile object is checked. (Relevant for objects that can have a check mark.)

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`state` | boolean | <optional> | When provided, this method acts as a setter and sets the isChecked value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored isChecked value; otherwise it returns 'this' for use with the builder pattern.

Type
  boolean | Description

## isClickable(isClickableopt ) → {boolean|Description}

Indicates whether the mobile object can be tapped.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`isClickable` | boolean | <optional> | When provided, this method acts as a setter and sets the isClickable value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored isClickable value; otherwise it returns 'this' for use with the builder pattern.

Type
  boolean | Description

## isEnabled(stateopt ) → {boolean|Description}

Indicates whether the mobile object can be enabled.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`state` | boolean | <optional> | When provided, this method acts as a setter and sets the isEnabled value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored isEnabled value; otherwise it returns 'this' for use with the builder pattern.

Type
  boolean | Description

## isFocusable(stateopt ) → {boolean|Description}

Indicates whether the object can receive focus.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`state` | boolean | <optional> | When provided, this method acts as a setter and sets the isFocusable value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored isFocusable value; otherwise it returns 'this' for use with the builder pattern.

Type
  boolean | Description

## isFocused(stateopt ) → {boolean|Description}

Indicates whether the mobile object is in focus.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`state` | boolean | <optional> | When provided, this method acts as a setter and sets the isFocused value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored isFocused value; otherwise it returns 'this' for use with the builder pattern.

Type
  boolean | Description

## mobileCenterIndex(indexopt ) → {number|Description}

An ordinal number assigned to the object to indicate the order in which the object appears on the device relative to other objects with an otherwise identical description.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`index` | number | <optional> | When provided, this method acts as a setter and sets the mobileCenterIndex.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored mobileCenterIndex; otherwise it returns 'this' for use with the builder pattern.

Type
  number | Description

## nativeClass(nativeClassopt ) → {string|Description}

The native class of the mobile object.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`nativeClass` | string | <optional> | When provided, this method acts as a setter and sets the nativeClass.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored nativeClass; otherwise it returns 'this' for use with the builder pattern.

Type
  string | Description

## resourceId(idopt ) → {string|Description}

The resource ID of the object. (Android only)

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`id` | string | <optional> | When provided, this method acts as a setter and sets the resourceId.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored resourceId; otherwise it returns 'this' for use with the builder pattern.

Type
  string | Description

## text(textopt ) → {string|Description}

The object's text.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`text` | string | <optional> | When provided, this method acts as a setter and sets the text value.

##### Returns:

If no parameter is provided, the method acts as a getter and returns the current stored text value; otherwise it returns 'this' for use with the builder pattern.

Type
  string | Description

## vri(valueopt )

Sets a VisualRelation definition.
The VRI definition helps to distinguish this object from other objects with otherwise identical descriptions, based on this object's visual relationship to another object in the application.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`value` | Array.<Object> | <optional> | Array that contains multiple VRI definitions for this test object. ###### Properties
Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`anchor` | Object |  |  | The related test object.
`horizontal` | Horizontal | <optional> |  | The horizontal relation definition.
`hInline` | boolean | <optional> | false | The horizontal inline definition.
`vertical` | Vertical | <optional> |  | The vertical relation definition.
`vInline` | string | <optional> | false | The vertical inline definition.
`proximity` | Proximity | <optional> |  | The proximity relation definition.