Scripting API / inspection/tests/CoreTestApi
inspection/tests/CoreTestApi
Classes
abstract CoreTestApi
Allows modification, retrieval, and event binding of a test with the given id.
Extended by
Interfaces
IClickableTest
Methods
onClick()
onClick(
fn):ScriptEventSubscription
Bind a function to fire after a button test was clicked.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
IDataTest
Methods
onRTFChanged()
onRTFChanged(
fn):ScriptEventSubscription
Bind a function to fire after a real-time failure has changed.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
IFocusableTest
Methods
focus()
focus():
void
Moves the focus to this test. This does nothing if the test is not in the currently-running sub-inspection or the global tag area.
Returns
void
IHasTestFocusEvents
Methods
onFocusIn()
onFocusIn(
fn):ScriptEventSubscription
Bind a function to fire after a test gained focus.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
onFocusOut()
onFocusOut(
fn):ScriptEventSubscription
Bind a function to fire after a test lost focus.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
IPaginatableTest
Methods
onPaginate()
onPaginate(
fn):ScriptEventSubscription
Bind a function to fire whenever pagination is requested.
To return the pagination data, call setResponse() on the event. This expects a ListApiResponse
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => Promise<void> |
The function to fire. The event data will be a ListRequestOptions. |
Returns
ScriptEventSubscription
ISelectableTest
Methods
onOptionSelected()
onOptionSelected(
fn):ScriptEventSubscription
Bind a function to fire when an option was selected on a selectable test.
Parameters
| Parameter | Type | Description |
|---|---|---|
fn |
(event) => void |
The function to fire. |
Returns
ScriptEventSubscription
IUpdateablePropertyTest
Methods
getProperties()
getProperties():
Promise<any>
Gets the test's properties
Returns
Promise<any>
updateProperties()
updateProperties(
newProps):Promise<any>
Updates the test with new values.
Parameters
| Parameter | Type | Description |
|---|---|---|
newProps |
Record<string, any> |
Object with new properties to use |
Returns
Promise<any>
IValueTest
Methods
clearValue()
clearValue():
Promise<void>
Clears a currently-running test's value. This throws an error if the test is not in the currently-running sub-inspection or the global tag area.
Returns
Promise<void>