Instructs the probe to run a specific function when the test completes, either prematurely or properly.
rtcCallWhenDone() can be used by applications to try to gracefully close a session or to collect and share data from the session as needed. This script command receives a function as an input. This function is called when the test finishes running.
Arguments
Name | Type | Description |
---|---|---|
runFunct | function(boolean) | Function to be called when the script finishes running. |
Notes
- A boolean value indicating if the test completed prematurely is passed to the runFunc function as its only variable
Example
client.rtcCallWhenDone(function(completedPrematurely) {
client
.rtcSetAdditionalInfo("stopped prematurely " + failed)
.rtcScreenshot("stopped prematurely " + failed);
});