Uiform module

class appian_locust.uiform.ai_skill_uiform.AISkillUiForm(rdo_interactor: _RDOInteractor, rdo_state: Dict[str, Any], ai_skill_id: str, breadcrumb: str = 'AISkillUi')

Bases: SailUiForm

save_ai_skill_changes(locust_request_label: str | None = None) AISkillUiForm
Saves an AI Skill Object. This is done in two parts:
  1. Clicking on the Save Changes button which creates an LCP request.

  2. Persisting the model to the RDO Server

Parameters:

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

Returns (AISkillUiForm): The latest state of the AI Skill UiForm

Example

>>> form.save_ai_skill_changes()
upload_documents_to_multiple_file_upload_field(label: str, file_paths: List[str], locust_request_label: str | None = None) AISkillUiForm

Uploads multiple documents to an MLAS upload field.

Parameters:
  • label (str) – Currently Unused

  • file_paths (list) – List of document file paths in string form

Keyword Arguments:

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

Returns (AISkillUiForm): The latest state of the AI Skill UiForm

Example

>>> form.upload_document_to_multiple_file_upload_field(["/usr/local/appian/File1.pdf", "/usr/local/appian/File2.pdf"])
class appian_locust.uiform.application_uiform.ApplicationUiForm(interactor: _Interactor, state: Dict[str, Any], breadcrumb: str = 'ApplicationUi')

Bases: SailUiForm

click_ai_skill(ai_skill_name: str, locust_request_label: str | None = None) AISkillUiForm

Click on an AI Skill in the design object grid. The current view of the grid must contain the skill you wish to click. :param ai_skill_name: The name of the AI Skill to click on

Returns (AISkillUiForm): UiForm representing UI of AI Skill

click_design_object(design_object_name: str, locust_request_label: str | None = None) DesignObjectUiForm

Click on a design object in the design object grid. The current view of the grid must contain the object you wish to click. :param design_object_name: The name of the design object to click on

Returns (DesignObjectUiForm): UiForm representing UI of design object

create_ai_skill_object(ai_skill_name: str, ai_skill_type: AISkillObjectType) ApplicationUiForm

Creates an AI Skill with the given name

Returns: The SAIL UI Form after the record type is created

create_record_type(record_type_name: str) ApplicationUiForm

Creates a record type with the given name

Returns: The SAIL UI Form after the record type is created

create_report(report_name: str) ApplicationUiForm

Creates a report with the given name

Returns: The SAIL UI Form after the report is created

filter_design_objects(design_object_types: list[appian_locust.objects.design_object.DesignObjectType]) ApplicationUiForm

Filter the design object list in an Application, must be on page with design object list :param design_object_types: List of the types of objects you wish to filter on :type design_object_types: DesignObjectType

Returns (ApplicationUiForm): ApplicationUiForm with filtered list of design objects

get_available_design_objects() Dict[str, DesignObject]

Retrieve all available design objects in the application, must be on page with design object list

Returns (dict): Dictionary mapping design object names to DesignObject

search_objects(search_str: str, locust_label: str | None = None) ApplicationUiForm

Search the design object list in an Application, must be on page with design object list :param search_str: The string to search :type search_str: str :param locust_label: Label to associate request with :type locust_label: str

Returns (ApplicationUiForm): A UiForm with updated state after the search is complete

class appian_locust.uiform.design_object_uiform.DesignObjectUiForm(interactor: _Interactor, state: Dict[str, Any], breadcrumb: str = 'DesignObjectUi')

Bases: SailUiForm

click_record_type_application_navigation_tab(navigation_tab_label: str, locust_request_label: str | None = None) DesignObjectUiForm

Interacts with an ApplicationNavigationLayout component. This interaction involves clicking the Section Items in the navigation sidebar tab of Record Type e.g. Actions, Views, etc.

Parameters:

navigation_tab_label (str) – The label or identifier for the navigation component.

Keyword Arguments:

locust_request_label (str) – Label used to identify the request for locust statistics.

Returns (DesignObjectUiForm): The latest state of the UiForm.

Examples

>>> form.click_record_type_application_navigation_tab(navigation_page_label="Actions")
launch_query_editor() DesignObjectUiForm

Calls the post operation to click on the LaunchVQD button in the toolbar for the ExpressionEditorWidget. This will launch the query editor with the expression currently in the expression editor.

Returns (DesignObjectUiForm): UiForm updated with state representing launched query editor

class appian_locust.uiform.design_uiform.DesignUiForm(interactor: _Interactor, state: Dict[str, Any], breadcrumb: str = 'DesignUi')

Bases: SailUiForm

click_application(application_name: str, locust_request_label: str | None = None) ApplicationUiForm

Click on an application in the /design application grid. Must be on the current page to be clicked.

Parameters:
  • application_name (str) – The name of the application to click on

  • locust_request_label (str, optional) – label to be used within locust

Returns (ApplicationUiForm): The latest state of the UiForm, representing the application clicked on

create_application(application_name: str) ApplicationUiForm

Creates an application and returns a form within representing the app contents

Returns: The SAIL UI Form

filter_design_objects(design_object_types: list[appian_locust.objects.design_object.DesignObjectType]) DesignUiForm

Filter the design object list in /design, must be on page with design object list :param design_object_types: List of the types of objects you wish to filter on :type design_object_types: DesignObjectType

Returns (DesignUiForm): DesignUiForm with filtered list of design objects

get_available_applications() Dict[str, Application]

Retrieve all available applications in /design. Must be on page with application list

Returns (dict): Dictionary mapping application names to Application

get_available_design_objects() Dict[str, DesignObject]

Retrieve all available design objects in the application. Must be on page with design object list

Returns (dict): Dictionary mapping design object names to DesignObject

import_application(app_file_path: str, customization_file_path: str | None = None, inspect_and_import: bool = False) None

Import an application into the Appian instance. :param app_file_path: Local path to the application zip file :param customization_file_path: Local path to customization file :param inspect_and_import: Set to true if Appian Locust should “Inspect” before importing

Returns: None

search_applications(search_str: str, locust_label: str | None = None) DesignUiForm

Search the application list in /design, must be on page with application list :param search_str: The string to search :type search_str: str :param locust_label: Label to associate request with :type locust_label: str

Returns (DesignUiForm): A UiForm with updated state after the search is complete

search_objects(search_str: str, locust_label: str | None = None) DesignUiForm

Search the design object list in /design, must be on page with design object list :param search_str: The string to search :type search_str: str :param locust_label: Label to associate request with :type locust_label: str

Returns (DesignUiForm): A UiForm with updated state after the search is complete

class appian_locust.uiform.record_list_uiform.RecordListUiForm(interactor: _Interactor, state: Dict[str, Any], breadcrumb: str = 'RecordListUi')

Bases: SailUiForm

UiForm representing a Record List from Tempo Records

clear_records_search_filters() RecordListUiForm

Clear any search filters on the records list

Returns: Unfiltered RecordsListUiForm

click_record_list_action(label: str, locust_request_label: str | None = None) RecordListUiForm

Click on an action in a record list :param label: The label of the record list action to click :param locust_request_label: The label locust should associate with this request

Returns: UiForm with action clicked

This method allows you to Filter the Record Type List (displaying record instance for a specific record type) which makes the same request when typing something in the search box and reloading the page. More interactions (with the filtered list) can be performed on the returned SailUiForm Object.

Note: This function does not require unfocusing from the search box as you would in the UI.

Parameters:
  • search_term (str, optional) – Term to filter records list to

  • locust_label (str, optional) – label to associate request with

Examples

>>> form.filter_records_using_searchbox('Donuts')

Returns (RecordListUiForm): The record type list UiForm with the filtered results.

get_visible_record_instances(column_index: int | None = None) Dict[str, Any]

Retrieve information about all visible records on the page. :param column_index: Which column to retrieve record information for. If no column is selected, every record link in the UI will be retrieved.

Returns: Dictionary with record instance information

class appian_locust.uiform.record_uiform.RecordInstanceUiForm(interactor: _Interactor, state: Dict[str, Any], summary_view: bool = True, breadcrumb: str = 'RecordUi')

Bases: SailUiForm

UiForm representing a Record Instance UI. Supports both summary and header record views. Defaults to summary view

get_header_view() RecordInstanceUiForm

Get the header view of the record instance Returns (RecordInstanceUiForm): UiForm updated to header view

get_summary_view() RecordInstanceUiForm

Get the summary view of the record instance Returns (RecordInstanceUiForm): UiForm updated to summary view

class appian_locust.uiform.uiform.SailUiForm(interactor: _Interactor, state: Dict[str, Any], breadcrumb: str = 'SailUi')

Bases: object

assert_no_validations_present() SailUiForm

Raises an exception if there are validations present on the form, otherwise, returns the form as is

Returns (SailUiForm): Form as it was when validations were asserted

check_checkbox_by_label(label: str, indices: List[int], locust_request_label: str = '') SailUiForm

Checks a checkbox by its label Indices are positions to be checked

Parameters:
  • label (str) – Value for label of the checkbox

  • indices (str) – Indices of the checkbox to check. Pass None or empty to uncheck all

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.check_checkbox_by_label('myLabel', [1])  # checks the first item
>>> form.check_checkbox_by_label('myLabel', None) # unchecks
check_checkbox_by_test_label(test_label: str, indices: List[int], locust_request_label: str = '') SailUiForm

Checks a checkbox by its testLabel attribute Indices are positions to be checked

Parameters:
  • test_label (str) – Value for the testLabel attribute of the checkbox

  • indices (str) – Indices of the checkbox to check. Pass None or empty to uncheck all

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.check_checkbox_by_test_label('myTestLabel', [1])  # checks the first item
>>> form.check_checkbox_by_test_label('myTestLabel', None) # unchecks
click(label: str, is_test_label: bool = False, locust_request_label: str = '', index: int = 1) SailUiForm

Clicks on a component on the form, if there is one present with the following label (case sensitive) Otherwise throws a NotFoundException

Can also be called as ‘click_link’ or ‘click_button’ to convey intent

This can also click StartProcessLinks or ProcessTaskLinks

Parameters:
  • label (str) – Label of the component to click

  • is_test_label (bool) – If you are clicking a button or link via a test label instead of a label, set this boolean to true

Keyword Arguments:
  • locust_request_label (str) – Label used to identify the request for locust statistics

  • index (int) – Index of the component to click if more than one match the label criteria (default: 1)

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.click('Submit')
>>> form.click('SampleTestLabel', is_test_label = True)
click_button(label: str, is_test_label: bool = False, locust_request_label: str = '', index: int = 1) SailUiForm

Clicks on a component on the form, if there is one present with the following label (case sensitive) Otherwise throws a NotFoundException

This can also click StartProcessLinks or ProcessTaskLinks

Parameters:
  • label (str) – Label of the component to click

  • is_test_label (bool) – If you are clicking a button via a test label instead of a label, set this boolean to true

Keyword Arguments:
  • locust_request_label (str) – Label used to identify the request for locust statistics

  • index (int) – Index of the component to click if more than one match the label criteria (default: 1)

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.click_button('Save')
>>> form.click_link('Update')
click_card_layout_by_index(index: int, locust_request_label: str = '') SailUiForm

Clicks a card layout link by index. This method will find the CardLayout component on the UI by index and then perform the click behavior on its Link component.

Parameters:

index (int) – Index of the card layout on which to click. (first found card layout , or second etc.) (Indices start from 1)

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

This finds link field on the 2nd card layout on the page and clicks it. It handles StartProcessLink as well, so no need to call click_start_process_link() when it is on a CardLayout.

>>> form.click_card_layout_by_index(2)

Click on a link in a grid with plaintext values

Either a label or an index is required, indices are useful if there is no title for the grid

Parameters:
  • column_name (str) – The name of the column the link is in

  • row_index (int) – The row in the column to click on, 0 indexed

  • grid_label (str) – The label of the grid, if index is not supplied

  • grid_index (str) – the index of the grid, if label is not supplied

  • locust_request_label (str, optional) – The label locust should associate this request with

Returns (SailUiForm): The latest state of the UiForm

Click on a Record link in a grid with plaintext values

Either a label or an index is required, indices are useful if there is no title for the grid

NOTE: This method returns a NEW RecordInstanceUiForm object, so you must save its return value into a new variable, like so:

>>> record_uiform = other_uiform.click_grid_plaintext_record_link(...)
Parameters:
  • column_name (str) – The name of the column the link is in

  • row_index (int) – The row in the column to click on, 0 indexed

  • grid_label (str) – The label of the grid, if index is not supplied

  • grid_index (str) – the index of the grid, if label is not supplied

  • locust_request_label (str, optional) – The label locust should associate this request with

Returns (SailUiForm): The latest state of the UiForm

Click on a link in a grid with RichText values

Either a label or an index is required, indices are useful if there is no title for the grid

Parameters:
  • column_name (str) – The name of the column the link is in

  • row_index (int) – The row in the column to click on, 0 indexed

  • grid_label (str) – The label of the grid, if index is not supplied

  • grid_index (str) – the index of the grid, if label is not supplied

  • locust_request_label (str, optional) – The label locust should associate this request with

Returns (SailUiForm): The latest state of the UiForm

Click on a Record link in a grid with RichText values

Either a label or an index is required, indices are useful if there is no title for the grid

NOTE: This method returns a NEW RecordInstanceUiForm object, so you must save its return value into a new variable, like so:

>>> record_uiform = other_uiform.click_grid_rich_text_record_link(...)
Parameters:
  • column_name (str) – The name of the column the link is in

  • row_index (int) – The row in the column to click on, 0 indexed

  • grid_label (str) – The label of the grid, if index is not supplied

  • grid_index (str) – the index of the grid, if label is not supplied

  • locust_request_label (str, optional) – The label locust should associate this request with

Returns (SailUiForm): The latest state of the UiForm

Clicks on a component on the form, if there is one present with the following label (case sensitive) Otherwise throws a NotFoundException

This can also click StartProcessLinks or ProcessTaskLinks

Parameters:
  • label (str) – Label of the component to click

  • is_test_label (bool) – If you are clicking a link via a test label instead of a label, set this boolean to true

Keyword Arguments:
  • locust_request_label (str) – Label used to identify the request for locust statistics

  • index (int) – Index of the component to click if more than one match the label criteria (default: 1)

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.click_link('Update')
click_menu_item_by_choice_index(label: str, choice_index: int, is_test_label: bool = False, locust_request_label: str = '') SailUiForm

Clicks an item in a MenuLayout provided the index of the chosen MenuItem ValueError is thrown if component found is NOT a MenuLayout, IndexError is thrown if the provided choice index is out of bounds for the available menu items

Parameters:
  • label (str) – Label of the MenuLayout

  • choice_index (str) – Index of the MenuItem to select

  • is_test_label (bool) – True if you are finding a MenuLayout by test label instead of a label, False o.w.

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.click_menu_item_by_choice_index("changeScopeMenu", 0, True, locust_request_label="Create Scope")
click_menu_item_by_name(label: str, choice_name: str, is_test_label: bool = False, locust_request_label: str = '') SailUiForm

Clicks an item in a MenuLayout provided the primaryText of the chosen MenuItem ValueError is thrown if component found is NOT a MenuLayout, OR if the MenuLayout doesn’t contain specified choice

Parameters:
  • label (str) – Label of the MenuLayout

  • choice_name (str) – PrimaryText of the MenuItem to select

  • is_test_label (bool) – True if you are finding a MenuLayout by test label instead of a label, False o.w.

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.click_menu_item_by_name("changeScopeMenu", "Scope 2", True, locust_request_label="Change Scope")

Click a record link on the form if there is one present with the following label (case sensitive) Otherwise throws a ComponentNotFoundException

Parameters:
  • label (str) – Label of the record link to click

  • is_test_label (bool) – If you are clicking a record link via a test label instead of a label, set this boolean to true

Keyword Arguments:

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

NOTE: This method returns a NEW RecordInstanceUiForm object, so you must save its return value into a new variable, like so:

>>> record_uiform = other_uiform.click_record_link(...)

Returns (RecordUiForm): The record form (feed) for the linked record.

Click the index’th record link on the form if there is one present with an attribute matching attribute_value If no attribute is provided, the index’th record link is selected from all record links in the form Otherwise throws a ComponentNotFoundException

NOTE: This method returns a NEW RecordInstanceUiForm object, so you must save its return value into a new variable, like so:

>>> record_uiform = other_uiform.click_record_link_by_attribute_and_index(...)
Keyword Arguments:
  • attribute (str) – Attribute to check for ‘attribute_value’ (default: “”)

  • attribute_value (str) – Attribute value of record link to click (default: “”)

  • index (int) – Index of record link to click (default: 1)

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

Returns (SailUiForm): The record form (feed) for the linked record.

Click the index’th record link on the form Otherwise throws a ComponentNotFoundException

Parameters:

index (int) – Index of the record link to click (1-based)

Keyword Arguments:

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

Returns (SailUiForm): The record form (feed) for the linked record.

click_record_search_button_by_index(index: int = 1, locust_request_label: str = '') SailUiForm

Clicks the Search button of a record grid.

Parameters:

index (int) – Index of the record search button on the form

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.click_record_search_button_by_index(1)

Click a record view link on the form if there is one present with the following label (case sensitive) Otherwise throws a ComponentNotFoundException

Parameters:

label (str) – Label of the record link to click

Keyword Arguments:

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

NOTE: This method returns a NEW RecordInstanceUiForm object, so you must save its return value into a new variable, like so:

>>> record_uiform = other_uiform.click_record_view_link(...)

Returns (SailUiForm): The record form (feed) for the linked record.

Clicks a related action (either a related action button or link) on the form by label If no link is found, throws a ComponentNotFoundException

Parameters:

label (str) – Label of the related action

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

How to use click_related_action():

Use records function - visit_record_instance_and_get_feed_form() to get Record Instance SailUiForm, then get the header response and finally click on the related action by label.

>>> feed_form = records.visit_record_instance_and_get_feed_form()

We need to get the header response or view response depending on if the related action is under the related actions dashboard or if it is a related action link on the summary view UI (which opens in a dialog).

>>> header_form = feed_form.get_record_header_form() or feed_form.get_record_view_form()
>>> header_form.click_related_action('Request upgrade')

Clicks a start process link on the form by label If no link is found, throws a ComponentNotFoundException

Parameters:

label (str) – Label of the link

Keyword Arguments:
  • is_mobile (bool) – Boolean to use the mobile form of the request

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

  • is_test_label (bool) – Boolean indicating if label is a test label

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.click_start_process_link('Request upgrade')

Clicks a start process link on the form by label (for Mobile) If no link is found, throws a ComponentNotFoundException

Parameters:
  • label (str) – Label of the link

  • site_name (str) – Name of the site (i.e. the Sites feature)

  • page_name (str) – Name of the page within the site

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.click_start_process_link_on_mobile('Open Issue')
click_tab_by_label(tab_label: str, tab_group_test_label: str, locust_request_label: str = '') SailUiForm

Selects a Tab by its label and its tab group’s testLabel

Parameters:
  • tab_label (str) – Label of the tab to select

  • tab_group_test_label (str) – Test Label of the tab group (tab is part of a tab group)

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples:

fill_cascading_pickerfield(label: str, selections: List[str], format_test_label: bool = True, locust_request_label: str = '') SailUiForm

Select a choice for a cascading pickerfield, one where multiple choices can be chained together

Parameters:
  • label (str) – Label of the field to fill out

  • selections (str) – The series of options to select through

Keyword Arguments:
  • format_test_label (bool) – If you don’t want to prepend a “test-” to the testLabel, set this to False

  • locust_request_label (str) – Label to associate in locust statistics with selecting the picker choice

fill_date_field(label: str, date_input: date, locust_request_label: str = '') SailUiForm

Fills a date field with the specified date

Parameters:
  • label (str) – Label of the date field

  • date_input (date) – Date used to fill the field

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.fill_date_field('Today', datetime.date.today())
>>> form.fill_date_field('Date of Birth', datetime.date(1992, 12, 30))
fill_datetime_field(label: str, datetime_input: datetime, locust_request_label: str = '') SailUiForm

Fills a datetime field with the specified datetime

NOTE: this does one api call for both the date and time, whereas filling the elements on screen requires two separate evaluations, one to fill the date field and one to fill the time field. This is the way the request would look if one of the fields were already filled.

Parameters:
  • label (str) – Label of the datetime field

  • datetime_input (date) – Date time used to fill the field

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.fill_datetime_field('Now', datetime.datetime.now())
>>> form.fill_datetime_field('Date and Time of Birth', datetime.datetime(1992, 12, 30, 12, 30, 5))
fill_field_by_any_attribute(attribute: str, value_for_attribute: str, text_to_fill: str, locust_request_label: str = '', index: int = 1) SailUiForm

Selects a Field by “attribute” and its value provided “value_for_attribute” and fills it with text “text_to_fill”

Parameters:
  • attribute (str) – Name of the component to fill

  • value_for_attribute (str) – Value for the attribute passed in to this function

  • text_to_fill (str) – Value to fill the field with

Keyword Arguments:
  • locust_request_label (str) – Label used to identify the request for locust statistics

  • index (int) – Index of the field to fill if more than one match the label criteria (default: 1)

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.fill_field_by_any_attribute("placeholder", "Write a comment", "Hello, Testing")
# selects the Component with the "placeholder" attribute having "Write a comment" value
# and fills it with "Hello, Testing"
fill_field_by_attribute_and_index(attribute: str, attribute_value: str, fill_value: str, index: int = 1, locust_request_label: str = '') SailUiForm

Selects a Field by “attribute” and its value provided “attribute_value” and an index if more than one Field is found and fills it with text “fill_value”

Parameters:
  • attribute (str) – Name of the field to fill

  • attribute_value (str) – Value for the attribute passed in to this function

  • fill_value (str) – Value to fill in the field

Keyword Arguments:
  • index (int) – Index of the field to fill if more than one match the attribute and attribute_value criteria (default: 1)

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.fill_field_by_attribute_and_index("label", "Write a comment", "Hello, Testing")
# selects the first Component with the "label" attribute having "Write a comment" value
# and fills it with "Hello, Testing"
>>> form.fill_field_by_attribute_and_index("label", "Write a comment", "Hello, Testing", 2)
# selects the second Component with the "label" attribute having "Write a comment" value
# and fills it with "Hello, Testing"
fill_field_by_index(type_of_component: str, index: int, text_to_fill: str, locust_request_label: str = '') SailUiForm

Selects a Field by its index and fills it with a text value

Parameters:
  • type_of_component (str) – Name of the component to fill

  • index (int) – Index of the field on the page (is it the first one found, or second etc.)

  • value (int) – Value to fill in the field of type ‘type_of_component’

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.fill_field_by_index("ParagraphField", 1, "Hello, Testing")
# selects the first ParagraphField with the value "Hello, Testing"
fill_paragraph_field(label: str, value: str, is_test_label: bool = False, locust_request_label: str = '', index: int = 1) SailUiForm

Fills a field on the form, if there is one present with the following label (case sensitive) Otherwise throws a NotFoundException

Parameters:
  • label (str) – Label of the field to fill out

  • value (str) – Value to fill the field with

Keyword Arguments:
  • is_test_label (bool) – If you are filling a text field via a test label instead of a label, set this boolean to true

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

  • index (int) – Index of the field to fill if more than one match the label criteria (default: 1)

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.fill_text_field('Title','My New Novel')
fill_picker_field(label: str, value: str, identifier: str = 'id', format_test_label: bool = True, fill_request_label: str = '', pick_request_label: str = '') SailUiForm

Enters the value in the picker widget and selects one of the suggested items if the widget is present with the following label (case sensitive)

If there is more than one suggestion, this method will select a random one out of the list

Otherwise this throws a NotFoundException

The mechanism it uses to find a pickerWidget is prefixing the picker field label with test- and looking for a testLabel

Parameters:
  • label (str) – Label of the field to fill out

  • value (str) – Value to update the label to

Keyword Arguments:
  • identifier (str) – Key to select the field to filter on, defaults to ‘id’

  • format_test_label (bool) – If you don’t want to prepend a “test-” to the testLabel, set this to False

  • fill_request_label (str) – Label to associate in locust statistics with filling the picker field

  • pick_request_label (str) – Label to associate in locust statistics with selecting the picker suggestion

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.fill_picker_field('Title','My New Novel')
>>> form.fill_picker_field('People','Jeff George')
>>> form.fill_picker_field('Customer', 'GAC Guyana', identifier='code')
fill_text_field(label: str, value: str, is_test_label: bool = False, locust_request_label: str = '', index: int = 1) SailUiForm

Fills a field on the form, if there is one present with the following label (case sensitive) Otherwise throws a NotFoundException

Parameters:
  • label (str) – Label of the field to fill out

  • value (str) – Value to fill the field with

Keyword Arguments:
  • is_test_label (bool) – If you are filling a text field via a test label instead of a label, set this boolean to true

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

  • index (int) – Index of the field to fill if more than one match the label criteria (default: 1)

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.fill_text_field('Title','My New Novel')
get_dropdown_items(label: str, is_test_label: bool = False) List[str]

Gets all dropdown items for the dropdown label provided on the form If no dropdown found, throws a NotFoundException

Parameters:
  • label (str) – Label of the dropdown

  • is_test_label (bool) – If you are interacting with a dropdown via a test label instead of a label, set this boolean to true. User filters on a record instance list use test labels.

Returns (List): A list of all the choices in the dropdown

Examples

>>> form.get_dropdown_items('MyDropdown')
get_latest_state() Dict[str, Any]

Provides a deep copy of latest state of UI form.

Returns (dict): deep copy of last recorded response.

go_to_next_record_grid_page(locust_request_label: str = '') SailUiForm
move_to_beginning_of_paging_grid(label: str | None = None, index: int | None = None, locust_request_label: str = '') SailUiForm

Moves to the beginning of a paging grid, if possible Either a label or an index is required, indices are useful if there is no title for the grid

Parameters:
  • label (str) – Label of the grid

  • index (int) – Index of the grid

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.move_to_beginning_of_paging_grid(label='my nice grid')
move_to_end_of_paging_grid(label: str | None = None, index: int | None = None, locust_request_label: str = '') SailUiForm

Moves to the end of a paging grid, if possible Either a label or an index is required, indices are useful if there is no title for the grid

Parameters:
  • label (str) – Label of the grid

  • index (int) – Index of the grid

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.move_to_end_of_paging_grid(label='my nice grid')
move_to_left_in_paging_grid(label: str | None = None, index: int | None = None, locust_request_label: str = '') SailUiForm

Moves to the left in a paging grid, if possible It might require getting the state of the grid if you’ve moved to the end/ previous part of the grid Either a label or an index is required, indices are useful if there is no title for the grid

Parameters:
  • label (str) – Label of the grid

  • index (int) – Index of the grid

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.move_to_left_in_paging_grid(label='my nice grid')
move_to_right_in_paging_grid(label: str | None = None, index: int | None = None, locust_request_label: str = '') SailUiForm

Moves to the right in a paging grid, if possible It might require getting the state of the grid if you’ve moved within the grid Either a label or an index is required, indices are useful if there is no title for the grid

Parameters:
  • label (str) – Label of the grid

  • index (int) – Index of the grid

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.move_to_right_in_paging_grid(index=0) # move to right in first grid on the page
refresh_after_record_action(label: str, is_test_label: bool = False, locust_request_label: str = '') SailUiForm

Refreshes a form after the completion of a record action.

Parameters:
  • label (str) – Label of the record action that has just been completed

  • is_test_label (bool) – If you are referencing a record action via a test label instead of a label, set this boolean to true

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> initial_form = copy(form)
>>> form.click('Request upgrade')
>>> ...
>>> form.click('Submit')
>>> initial_form.refresh_after_record_action('Request upgrade')
select_card_choice_field_by_label(label: str, index: int, locust_request_label: str = '') SailUiForm

Select a card by its label Index is position to be selected

Parameters:
  • label (str) – Label of the card choice field

  • index (int) – Index of the card to select

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_card_choice_field_by_label('myLabel', 1)  # selects the first item
select_date_range_user_filter(filter_label: str, filter_start_date: date, filter_end_date: date, locust_request_label: str | None = None) SailUiForm

Select a value on a date range user filter

Parameters:
  • filter_label (str) – the testLabel of the filter to select a value for

  • filter_start_date (date) – the start date for the range

  • filter_end_date (date) – the end date for the range

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_date_range_user_filter(filter_label="userFilter", filter_start_date=datetime.date(2023, 10, 18), filter_end_date=datetime.date(2023,10,19))
select_dropdown_item(label: str, choice_label: str, locust_request_label: str = '', is_test_label: bool = False) SailUiForm

Selects a dropdown item on the form If no dropdown found, throws a NotFoundException If no element found, throws a ChoiceNotFoundException

Parameters:
  • label (str) – Label of the dropdown

  • choice_label (str) – Label of the dropdown item to select

  • is_test_label (bool) – If you are interacting with a dropdown via a test label instead of a label, set this boolean to true. User filters on a record instance list use test labels.

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_dropdown_item('MyDropdown', 'My First Choice')
select_dropdown_item_by_index(index: int, choice_label: str, locust_request_label: str = '') SailUiForm

Selects a dropdown item on the form by index (1-based) If no dropdown found, throws a NotFoundException If no element found, throws a ChoiceNotFoundException

Parameters:
  • index (int) – index(int): Index of the dropdown to select

  • choice_label (str) – Label of the dropdown item to select

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_dropdown_item_by_index(1, 'My First Choice')
select_multi_dropdown_item(label: str, choice_label: List[str], locust_request_label: str = '', is_test_label: bool = False) SailUiForm

Selects a multiple dropdown item on the form If no multiple dropdown found, throws a NotFoundException If no element found, throws a ChoiceNotFoundException

Parameters:
  • label (str) – Label of the dropdown

  • choice_label ([str]) – Label(s) of the multiple dropdown item to select

  • is_test_label (bool) – If you are interacting with a multiple dropdown via a test label instead of a label, set this boolean to true. User filters on a record instance list use test labels.

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_multi_dropdown_item('MyMultiDropdown', ['My First Choice','My Second Choice'])
select_multi_dropdown_item_by_index(index: int, choice_label: List[str], locust_request_label: str = '') SailUiForm

Selects a multiple dropdown item on the form by index (1-based) If no multiple dropdown found, throws a NotFoundException If no element found, throws a ChoiceNotFoundException

Parameters:
  • index (int) – Index of the multiple dropdown to select

  • choice_label ([str]) – Label(s) of the multiple dropdown item to select

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_multi_dropdown_item_by_index(2, ['My First Choice','My Second Choice'])
select_nav_card_by_index(nav_group_label: str, index: int, is_test_label: bool = False, locust_request_label: str = '') SailUiForm

Selects an element of a navigation card group by its index

Parameters:
  • nav_group_label (str) – Label of the navigation card group

  • index (int) – Index of the element

Keyword Arguments:
  • is_test_label (bool) – If this label is a test label

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

Returns (SailUiForm): The latest state of the UiForm

select_radio_button_by_index(field_index: int, index: int, locust_request_label: str = '') SailUiForm

Selects a radio button by its field index Index is position to be selected

Parameters:
  • field_index (int) – Index of the radio button field on the page

  • index (int) – Index of the radio button to select

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_radio_button_by_index(1, 1)  # selects the first item in the first radio button field
select_radio_button_by_label(label: str, index: int, locust_request_label: str = '') SailUiForm

Selects a radio button by its label Index is position to be selected

Parameters:
  • label (str) – Label of the radio button field

  • index (int) – Index of the radio button to select

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_radio_button_by_label('myLabel', 1)  # selects the first item
select_radio_button_by_test_label(test_label: str, index: int, locust_request_label: str = '') SailUiForm

Selects a radio button by its test label Index is position to be selected

Parameters:
  • test_label (str) – Label of the radio button field

  • index (int) – Index of the radio button to select

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_radio_button_by_test_label('myTestLabel', 1)  # selects the first item
select_rows_in_grid(rows: List[int], label: str | None = None, index: int | None = None, append_to_existing_selected: bool = False, locust_request_label: str = '') SailUiForm

Selects rows in a grid Either a label or an index is required, indices are useful if there is no title for the grid

Parameters:
  • rows (List[int]) – The rows to select

  • label (str) – Label of the grid

  • index (int) – Index of the grid

  • append_to_existing_selected (bool) – Flag to control appending row selections

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.select_rows_in_grid(rows=[1], label='my nice grid')
sort_paging_grid(label: str | None = None, index: int | None = None, field_name: str = '', ascending: bool = False, locust_request_label: str = '') SailUiForm

Sorts a paging grid by the field name, which is not necessarily the same as the label of the column And might require inspecting the JSON to determine what the sort field is

Sorts by ascending = False by default, override to set it to True

Either a label or an index is required, indices are useful if there is no title for the grid

Parameters:
  • label (str) – Label of the grid

  • index (int) – Index of the grid

  • field_name (str) – Field to sort on (not necessarily the same as the displayed one)

  • ascending (bool) – Whether to sort ascending, default is false

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.sort_paging_grid(index=0,field_name='Total',ascending=True)
upload_document_to_upload_field(label: str, file_path: str, locust_request_label: str = '') SailUiForm

Uploads a document to a named upload field There are two steps to this which can fail, one is the document upload, the other is finding the component and applying the update.

Parameters:
  • label (str) – Label of the upload field

  • file_path (str) – File path to the document

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Examples

>>> form.upload_document_to_upload_field('Upload File', "/usr/local/appian/File.zip")
>>> form.upload_document_to_upload_field('Upload Properties', "/usr/local/appian/File.properties")
upload_documents_to_multiple_file_upload_field(label: str, file_paths: List[str], locust_request_label: str = '') SailUiForm

Uploads multiple documents to a named upload field There are two steps to this which can fail, one is the document uploads, the other is finding the component and applying the update.

Parameters:
  • label (str) – Label of the upload field

  • file_paths (list) – List of document file paths in string form

Keyword Arguments:

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

Returns (SailUiForm): The latest state of the UiForm

Example

>>> form.multi_upload_document_to_upload_field('Upload Files', ["/usr/local/appian/File1.zip", "/usr/local/appian/File2.zip"])