_records

class appian_locust._records._Records(interactor: appian_locust._interactor._Interactor)

Bases: appian_locust._base._Base

_get_mobile_records_uri(record_type_url_stub: str, search_string: str = None) → str
_get_random_record_instance(record_type: str = '') → Tuple[str, str]
_get_random_record_type() → str
_is_response_good(response_text: str) → bool
_record_type_list_request(record_type: str, is_mobile: bool = False, search_string: str = None) → Tuple[Dict[str, Any], str]
fetch_record_instance(record_type: str, record_name: str, exact_match: bool = True) → Dict[str, Any]

Get the information about a specific record by specifying its name and its record type.

Parameters:
  • record_type (str) – Name of the record type.

  • record_name (str) – Name of the record which should be available in the given record type

  • exact_match (bool) – Should record name match exactly or to be partial match. Default : True

Returns (dict): Specific record’s info

Raises: In case of record is not found in the system, it throws an “Exception”

Example

If full name of record type and record is known,

>>> self.appian.records.get("record_type_name", "record_name")

If only partial name is known,

>>> self.appian.records.get("record_type_name", "record_name", exact_match=False)
fetch_record_type(record_type: str, exact_match: bool = True) → Dict[str, Any]

Fetch information about record type from the cache. Raises Exception if record type does not exist in cache.

Parameters:

record_type (str) – Name of the record type.

Returns (dict): Specific record type’s info

Raises: In case the record type is not found in the system, it throws an “Exception”

Example

>>> self.appian.records.get_record_type("record_type_name")
get_all(search_string: str = None, locust_request_label: str = 'Records') → Dict[str, Any]

Retrieves all available “records types” and “records” and associated metadata from “Appian-Tempo-Records”

Note: All the retrieved data about record types and records is stored in the private variables self._record_types and self._records respectively

Returns (dict): List of records and associated metadata

get_all_mobile(search_string: str = None) → Dict[str, Any]

Retrieves all available “records types” and “records” and associated metadata from “Appian-Tempo-Records”

Note: All the retrieved data about record types and records is stored in the private variables self._record_types and self._records respectively

Returns (dict): List of records and associated metadata

get_all_record_types(locust_request_label: str = 'Records') → Dict[str, Any]

Navigate to Tempo Records Tab and load all metadata for associated list of record types into cache.

Returns (dict): List of record types and associated metadata

get_all_records_of_record_type(record_type: str, column_index: int = None, search_string: str = None) → Dict[str, Any]

Navigate to the desired record type and load all metadata for the associated list of record views into cache.

Parameters:
  • record_type (str) – Name of record type for which we want to enumerate the record instances.

  • column_index (int, optional) – Column index to only fetch record links from a specific column, starts at 0.

Returns (dict): List of records and associated metadata

Examples

>>> self.appian.records.get_all_records_of_record_type("record_type_name")
get_all_records_of_record_type_mobile(record_type: str, search_string: str = None) → Dict[str, Any]

Retrieves all the available “records” for the given record type for a mobile device.

Todo: Partial match functionality is not yet implemented

Returns (dict): List of records and associated metadata

Examples

>>> self.appian.records.get_all_records_of_record_type_mobile("record_type_name")
get_record(record_type: str, record_name: str, exact_match: bool = True) → Dict[str, Any]

Get the information about a specific record by specifying its name and its record type.

Parameters:
  • record_type (str) – Name of the record type.

  • record_name (str) – Name of the record which should be available in the given record type

  • exact_match (bool) – Should record name match exactly or to be partial match. Default : True

Returns (dict): Specific record’s info

Raises: In case of record is not found in the system, it throws an “Exception”

Example

If full name of record type and record is known,

>>> self.appian.records.get("record_type_name", "record_name")

If only partial name is known,

>>> self.appian.records.get("record_type_name", "record_name", exact_match=False)
get_records_interface(locust_request_label: str = 'Records') → Dict[str, Any]
get_records_nav(locust_request_label: str = 'Records') → Dict[str, Any]
visit(record_type: str = '', record_name: str = '', view_url_stub: str = '', exact_match: bool = True, locust_request_label: str = '') → Tuple[Dict[str, Any], str]

This function calls the API for the specific record view/instance to get its response data.

Note: This function is meant to only traverse to Record forms, not to interact with them. For that, use visit_record_instance_and_get_form()

Parameters:
  • record_type (str) – Record Type Name. If not specified, a random record type will be selected.

  • record_name (str) – Name of the record to be called. If not specified, a random record will be selected.

  • view_url_stub (str, optional) – page/tab to be visited in the record. If not specified, “summary” dashboard will be selected.

  • exact_match (bool, optional) – Should record type and record name matched exactly as it is or partial match.

  • locust_request_label (str,optional) – Label used to identify the request for locust statistics

Returns (tuple): Responses of Record’s Get UI call in a dictionary and the request URI as a string.

Examples

If full name of record type and record is known,

>>> self.appian.records.visit_record_instance("record_type_name", "record_name", "summary")

If only partial name is known,

>>> self.appian.records.visit_record_instance("record_type_name", "record_name", "summary", exact_match=False)

If a random record is desired,

>>> self.appian.records.visit_record_instance()

If random record of a specific record type is desired,

>>> self.appian.records.visit_record_instance("record_type_name")
visit_and_get_form(record_type: str = '', record_name: str = '', view_url_stub: str = '', exact_match: bool = False)appian_locust.uiform.SailUiForm

This function calls the API for the specific record view/instance and returns a SAIL form object that Locust users can interact with.

Note: Since this function is enabled for interactions, it has a higher runtime than visit_record_instance()

Parameters:
  • record_type (str) – Record Type Name. If not specified, a random record type will be selected.

  • record_name (str) – Name of the record to be called. If not specified, a random record will be selected.

  • view_url_stub (str, optional) – page/tab to be visited in the record. If not specified, “summary” dashboard will be selected.

  • exact_match (bool, optional) – Should record type and record name matched exactly as it is or partial match.

Returns: Custom SailUiForm object that can interact with Appian forms. Use this object to fill textfields, click links/buttons, etc…

Examples

If full name of record type and record is known,

>>> self.appian.records.visit_and_get_form("record_type_name", "record_name", "summary")

If only partial name is known,

>>> self.appian.records.visit_and_get_form("record_type_name", "record_name", "summary", exact_match=False)

If random record is desired,

>>> self.appian.records.visit_and_get_form()

If random record of a specific record type is desired,

>>> self.appian.records.visit_and_get_form("record_type_name")
visit_record_instance(record_type: str = '', record_name: str = '', view_url_stub: str = '', exact_match: bool = True, locust_request_label: str = '') → Tuple[Dict[str, Any], str]

This function calls the API for the specific record view/instance to get its response data.

Note: This function is meant to only traverse to Record forms, not to interact with them. For that, use visit_record_instance_and_get_form()

Parameters:
  • record_type (str) – Record Type Name. If not specified, a random record type will be selected.

  • record_name (str) – Name of the record to be called. If not specified, a random record will be selected.

  • view_url_stub (str, optional) – page/tab to be visited in the record. If not specified, “summary” dashboard will be selected.

  • exact_match (bool, optional) – Should record type and record name matched exactly as it is or partial match.

  • locust_request_label (str,optional) – Label used to identify the request for locust statistics

Returns (tuple): Responses of Record’s Get UI call in a dictionary and the request URI as a string.

Examples

If full name of record type and record is known,

>>> self.appian.records.visit_record_instance("record_type_name", "record_name", "summary")

If only partial name is known,

>>> self.appian.records.visit_record_instance("record_type_name", "record_name", "summary", exact_match=False)

If a random record is desired,

>>> self.appian.records.visit_record_instance()

If random record of a specific record type is desired,

>>> self.appian.records.visit_record_instance("record_type_name")
visit_record_instance_and_get_feed_form(record_type: str = '', record_name: str = '', exact_match: bool = True)appian_locust.uiform.SailUiForm

This function calls the API for the specific record view/instance and returns a SAILUiForm object for “feed” response. The returned SailUiForm object can then be used to get header response by using calling get_record_header_form(). The header form should have related actions available to interact with.

Parameters:
  • record_type (str) – Record Type Name. If not specified, a random record type will be selected.

  • record_name (str) – Name of the record to be called. If not specified, a random record will be selected.

  • exact_match (bool, optional) – Should record type and record name matched exactly as it is or partial match.

Returns: Custom SailUiForm object that can interact with Appian forms. Use this object to fill textfields, click links/buttons, etc…

visit_record_instance_and_get_form(record_type: str = '', record_name: str = '', view_url_stub: str = '', exact_match: bool = False)appian_locust.uiform.SailUiForm

This function calls the API for the specific record view/instance and returns a SAIL form object that Locust users can interact with.

Note: Since this function is enabled for interactions, it has a higher runtime than visit_record_instance()

Parameters:
  • record_type (str) – Record Type Name. If not specified, a random record type will be selected.

  • record_name (str) – Name of the record to be called. If not specified, a random record will be selected.

  • view_url_stub (str, optional) – page/tab to be visited in the record. If not specified, “summary” dashboard will be selected.

  • exact_match (bool, optional) – Should record type and record name matched exactly as it is or partial match.

Returns: Custom SailUiForm object that can interact with Appian forms. Use this object to fill textfields, click links/buttons, etc…

Examples

If full name of record type and record is known,

>>> self.appian.records.visit_and_get_form("record_type_name", "record_name", "summary")

If only partial name is known,

>>> self.appian.records.visit_and_get_form("record_type_name", "record_name", "summary", exact_match=False)

If random record is desired,

>>> self.appian.records.visit_and_get_form()

If random record of a specific record type is desired,

>>> self.appian.records.visit_and_get_form("record_type_name")
visit_record_type(record_type: str = '', exact_match: bool = True, is_mobile: bool = False) → Tuple[Dict[str, Any], str]

Navigate into desired record type and retrieve all metadata for associated list of record views.

Returns (dict): List of records and associated metadata

Examples

>>> self.appian.records.visit_record_type("record_type_name")
visit_record_type_and_get_form(record_type: str = '', exact_match: bool = False, is_mobile: bool = False)appian_locust.uiform.SailUiForm

This function calls the API for the specific record typew and returns a SAIL form object that Locust users can interact with.

Note: Since this function is enabled for interactions, it has a higher runtime than visit_record_type()

Parameters:
  • record_type (str) – Record Type Name. If not specified, a random record type will be selected.

  • exact_match (bool, optional) – Should record type and record name matched exactly as it is or partial match.

Returns: Custom SailUiForm object that can interact with Appian forms. Use this object to fill textfields, click links/buttons, etc…

Examples

If the full name of record type is known,

>>> self.appian.records.visit_record_type_and_get_form("record_type_name")

If only partial name is known,

>>> self.appian.records.visit_record_type_and_get_form("record_type_name", exact_match=False)

If random record type is desired,

>>> self.appian.records.visit_record_type_and_get_form()