XView Convenience API
Note: The XView Convenience API is only available for the Squish for XView editions.
Here are some quick links to the XView Convenience API's functions:
This function activates the menu item with the specified
itemText in the menu identified by the given
clickItem(object, x, y, state, button, action)
This function sends a mouse click at position
y in the
object item's coordinates to the panel item (such as a button, choice item, and so on) with the button
button, modifier state
state and action
action of the panel referenced by the
This function closes (hides) the frame called
This function closes the currently open notice (if one is open) using the specified
button so that it returns the specified
This function finds and returns a reference to a panel item given its fully qualified name
This function installs a global event handler. The script function named or referenced in
handlerFunctionNameOrReference, will be called when an event of the
eventName type occurs.
eventName can be any of the following event types:
- Crash occurs if the AUT crashes
- NoticeOpened occurs when a notice window is opened
- Timeout occurs when the Squish response timeout is reached
The function name passed as the
handlerFunctionName is called with a single argument—the object on which the event occurred.
Note: In Python scripts, you can specify the callback function to invoke by passing an actual function or a lambda function.
For examples see How to Use Event Handlers.
installEventHandler function will only work if it is called after the AUT has been started. For example, by using the ApplicationContext startApplication(autName) function).
This function returns a true value if a notice is currently open; otherwise it returns a false value.
This function returns the text of the last opened message.
This function opens (shows) the frame called
sendEvent(eventName, receiverObjectOrName, ...)
This function sends an event of type
receiverObjectOrName (i.e., to the given object or to the object identified by the given name). Any additional arguments are used to initialize the event that is sent (e.g., coordinates, button states, etc.).
eventNames are supported:
This function sends key events to the editable panel item
object to enter the given
text as if the user had typed the text at the keyboard. The input is case-sensitive, so
type(object, "R") is different from
This function uninstalls an event handler that has been previously installed using installEventHandler(eventName, handlerFunctionNameOrReference).