Share this page

# Element

## SAPGUI. Element

## new Element(propsopt) → {Element}

The description of a SAP GUI for Windows element

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`props` | Object | <optional> | Initializes a SAP GUI for windows element test object using the supplied property bag.

##### Returns:

the description object that was initialized.

Type
  Element

# Methods

## absoluteLocation(locationopt) → {Point|Description}

The object's coordinates relative to the screen in pixels. 0,0 is the top-left corner of the primary monitor.

##### Parameters:

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

##### Returns:

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

Type
  Point | Description

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

The element's unique identifier in text format.

##### Parameters:

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

##### Returns:

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

Type
  string | Description

## location(locationopt) → {Point|Description}

The object's coordinates relative to the parent's location in pixels.

##### Parameters:

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

##### Returns:

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

Type
  Point | Description

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

The name of the element.

##### Parameters:

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

##### Returns:

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

Type
  string | Description

## size(sizeopt) → {Size|Description}

The object's size in pixels.

##### Parameters:

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

##### Returns:

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

Type
  Size | Description

## type(typeopt) → {SAPGUI.ComponentType|Description}

The numeric identification of the GUI component type.

##### Parameters:

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

##### Returns:

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

Type
  SAPGUI.ComponentType | Description

Tips to improve your search results... UFT Developer JavaScript SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: