Mapping

class Mapping
AddItem(mappingItem)

Adds a mapping item to the mapping.

Parameters:
mappingItem

The mapping item to be added

Clone()

Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.

Returns:

A copy of this object

Return type:

Mapping

GetItemByName(name)

Searches the mapping for the mapping item by its name and returns it if existing.

Parameters:
name : str

The name of the mapping item to be searched for

Returns:

mapping item with the given name or None if no such mapping item exists

Return type:

MappingItem

GetItems()

Returns a list of all the mapping items of the mapping.

Returns:

List of all the mapping items of the mapping.

Return type:

list[MappingItem]

GetItemsByTargetPath(targetPath)

Searches the mapping for all mapping items that have the target path and returns them if existing.

Parameters:
targetPath : str

The target path of the mapping items to be searched for

Returns:

List of mapping items that have the target path.

Return type:

list[MappingItem]

HasItem(mappingItem)

Checks whether the given mapping item belongs to the mapping.

Parameters:
mappingItem

The mapping item to be checked

Returns:

True if the given mapping item belongs to the mapping.

Return type:

boolean

RemoveItemByName(name)

Removes a mapping item from the mapping.

Parameters:
name : str

The name of the mapping item to be removed

ReplaceItem(mappingItem)

Replaces a mapping item from the mapping

Parameters:
mappingItem

The new mapping item to replace an existing one of the same name