The framework provides several new primitive functions that simulate user actions, which may be used to test applications. You use these primitives and combine them just as regular MzScheme functions. For example,
(begin
(test:keystroke #\A)
(test:menu-select "File" "Save"))
sends a keystroke event to the window with the keyboard focus and invokes
the callback function for the ``Save'' menu item from the ``File'' menu.
This has the same effect as if the user typed the key ``A'', pulled
down the ``File'' menu and selected ``Save''.
It is possible to load this portion of the framework without loading the rest of the framework. See the libraries section for more details.
Currently, the test engine has primitives for pushing buttons, setting check-boxes and choices, sending keystrokes, selecting menu items and clicking the mouse. Many functions that are also useful in application testing, such as traversing a tree of panels, getting the text from a canvas, determining if a window is shown, and so on, exist in MrEd.