_sites¶
-
class
appian_locust._sites.Page(page_name: str, page_type: appian_locust._sites.PageType)¶ Bases:
objectClass representing a single Page within a site
-
exception
appian_locust._sites.PageNotFoundException¶ Bases:
Exception
-
class
appian_locust._sites.PageType(value)¶ Bases:
enum.EnumAn enumeration.
-
ACTION: str = 'action'¶
-
INTERFACE: str = 'interface'¶
-
RECORD: str = 'recordType'¶
-
REPORT: str = 'report'¶
-
-
class
appian_locust._sites.Site(name: str, display_name: str, pages: Dict[str, Page])¶ Bases:
objectClass representing a single site, as well as its pages
-
exception
appian_locust._sites.SiteNotFoundException¶ Bases:
Exception
-
class
appian_locust._sites._Sites(interactor: appian_locust._interactor._Interactor)¶ Bases:
appian_locust._base._Base-
BROWSER_ACCEPT_HEADER= 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3'¶
-
TEMPO_SITE_PAGE_NAV= '/suite/rest/a/sites/latest/D6JMim/page/news/nav'¶
-
_get_and_memoize_site_data(site_name: str, display_name: str, pages_names: List[str]) → appian_locust._sites.Site¶
-
_get_type_from_link_type(link_type: str) → appian_locust._sites.PageType¶
-
_setup_headers_with_accept() → dict¶
-
_setup_headers_with_sail_json() → dict¶
-
get_all(search_string: str = None, locust_request_label: str = None) → Dict[str, Any]¶ Gets and stores data for all sites, including all of their url stubs
-
get_page_names_from_ui(initial_nav_json: Dict[str, Any]) → List[str]¶ Extracts page names from the nav json
- Parameters
initial_nav_json – JSON from navigating to site tab
Returns: List of string, representing the page names
-
get_site_data_by_site_name(site_name: str) → Optional[appian_locust._sites.Site]¶ Gets site data from just the site url stub
- Parameters
site_name – Site url stub
Returns: Site object, containing the site name and pages
-
get_site_page(site_name: str, page_name: str) → Optional[appian_locust._sites.Page]¶ Gets site page from the site url stub and page url stub
- Parameters
site_name – Site url stub
page_name – Page url stub
Returns: Page object, representing an individual page of a site
Navigates to a site page, either a record, action or report.
- Parameters
site_name – Site Url stub
page_name – Page Url stub
Returns: Response of report/action/record
Navigates to a site page, either a record, action or report. If it is a record, then clicks on a random record instance on the first page
- Parameters
site_name – Site Url stub
page_name – Page Url stub
Returns: SailUiForm of a report/action, or in the case of a record, SailUiForm of a record instance
Navigates to a site page, either a record, interface, action or report. If a record, then clicks on a random record on the first page.
Note: Any record available in the record list as a recordLink will be hit using this function. There is no guarantee that this record will be of any specific type and may not point to a record view.
- Parameters
site_name – Site Url stub
page_name – Page Url stub
Returns: Response of report/action, or in the case of a record, response of record object
-
visit_and_get_form(site_name: str, page_name: str) → appian_locust.uiform.SailUiForm¶ Get a SailUiForm for a Task, Report or Action
- Parameters
site_name (str) – Site where the page exists
page_name (str) – Page to navigate to
Returns: SailUiForm
Example
>>> self.appian.sites.visit_and_get_form("site_name","page_name")
-