GUI automation
The GUI automation API consist of a set of JavaScript functions which enables programmatic access to some features normally controlled by a user in the GUI. These functions are grouped in a global window.Exivity object.
session
sessionControl the current user session.
.login
.loginfunction(string username, string password): void
Attempts to login given the username and password.
.logout
.logoutfunction(): void
Logs out the current user, and cleans up local storage used by the current session.
.refreshToken
.refreshTokenfunction(string token): void
Attempts to use the given token to login (always refreshes the given token).
.apiRoot
.apiRootfunction(string root): void
Set the domain (e.g. https://example.com:8002) for the Exivity API.
navigate
navigateNavigate the GUI.
.home
.homefunction(): void
Navigate to the root URL of the Exivity instance, which is the Dashboard if a user is currently logged in, or the login page otherwise.
.to
.tofunction(string path): void
Navigates to the given URL fragment.
report
reportControl the report filters and more.
.byId
.byIdfunction(int id): void
Select a report definition.
.depth
.depthfunction(int depth): void
Select a reporting depth.
.daterangeStart
.daterangeStartfunction(string start): void
Select a the reporting start date, in YYYYMMDD format.
.daterangeEnd
.daterangeEndfunction(string end): void
Select a the reporting end date, in YYYYMMDD format.
.filterAccount
.filterAccountfunction(int id): void
Filter the report by showing only this account.
.showSingleAccount
.showSingleAccountfunction(bool show = true): void
On the summary report, show only the single account set with filterAccount.
.showAllSummaries
.showAllSummariesfunction(bool show = true): void
Show all summaries if on the /reports/summary page.
.showConsolidatedSummaries
.showConsolidatedSummariesfunction(bool show = true): void
Show consolidated summary on the /reports/summary page.
.showSummaryAccounts
.showSummaryAccountsfunction(bool show = true): void
Show accounts on summary report.
.showSummaryServices
.showSummaryServicesfunction(bool show = true): void
Show services on summary report.
.showSummaryInstances
.showSummaryInstancesfunction(bool show = true): void
Show instances on summary report.
.summaryGroupInstanceBy
.summaryGroupInstanceByfunction(string key): void
Group the instances on the summary report by this key. The key argument should be one of: instances, services.
wait
waitFunctions returning a Promise to make it easier to determine the state of the GUI.
.ms
.msfunction(int|float ms): Promise
Wait for ms and then resolve the returned promise.
.networkIdle
.networkIdlefunction(int waitBefore = 100, int waitAfter = 100, int timeout = 60000): Promise
Wait for the network stack to become idle, optionally specifying:
A timeout before starting to detect network traffic
A timeout after detecting that the network became idle
A timeout after which the promise will reject. Set to
0to disable.
.syncComplete
.syncCompletefunction(): Promise
Wait for data synchronisation to complete.
Last updated
Was this helpful?