About
Event scripts trigger when a specific event occurs (for example, before a test case is executed). To lean more about events, see Handling Events.
The editors support all the standard features of ReadyAPI scripting editors such as property expansions, code validation, and code templates.
Script objects
Below is a list of the default objects that are available in the data source and data sink script editors:
Object | Description |
---|---|
context |
Provides a scripting interface to properties specific to the context of this specific event handler. |
log |
Includes methods and properties for posting messages to the Script log (to view this log, click Logs in the bottom left corner of the ReadyAPI window and switch to the Script log tab). You use this for debugging and logging purposes: to post and view data in the log. |
A number of other objects specific to the context of each particular event will also be available.
You can see methods and properties of these objects on the Code Completion list. To invoke it, type the object name and press Ctrl+Space.
Examples
Here are the links to examples of some scripts that can be run in the Events script editor: