Module FrankensteinDriver
In: frankenstein_driver.rb

The Frankenstein driver allows a Swing user interface to be tested. Regular expressions can be specified using the regular Ruby syntax.

Methods

Attributes

test_status  [RW] 

Public Class methods

Returns the location of the current test reporting directory.

Sets the location of the Frankenstein test reporting directory. The directory is usually specified before a test run.

Public Instance methods

Activates a dialog with a specified title.

The title can be specified as a regular expression

Activates an internal frame.

The title can be specified as a regular expression

Activates a window with a specified title.

The title can be specified as a regular expression

Checks whether an OGNL expression evaluated against a specified component matches the specified value.

The expected value can be specified as a regular expression.

Check whether a check box with the specified name is not selected

Check whether a check box with the specified name is selected

Check whether a component with the specified name is enabled

Check whether a component with the specified name is enabled

Checks whether the specified OGNL expression is false.

Checks whether the text of a specified label component matches the specified value.

Check the number of rows displayed in a table

Check whether a radio button with the specified name is not selected

Check whether a radio button with the specified name is selected

Check the value of a specified table cell. The cell value can be specified as a regular expression

Check the elements of a specified table row.

The cell values can be an arbitrary list of arguments, which are checked from left to right, starting at the first column.

The cell values can be specified as regular expressions.

Checks whether the text of a specified text component matches the specified value.

The expected text can be specified as a regular expression.

Check whether a toggle button with the specified name is not selected

Check whether a toggle button with the specified name is selected

Checks whether the specified OGNL expression is true.

Cancels a table edit.

Click on a specified button

Click on a specified checkbox.

The specified value can be true or false, and will select or deselect the checkbox

Click on a specified radio button.

Click on a specified column of a table header

Close all open dialogs recursively until no more dialogs are open.

This function can be used to remove unexpected dialogs at the end of a test.

Close an internal frame with the specified title.

The title can be specified as a regular expression.

Wait for a specified duration (in milliseconds)

Wait for a dialog with a specified title to be closed.

This function waits for 10 seconds in case the dialog is found to be open. (The wait will be made configurable in a future release). The title can be specified as a regular expression.

Wait for a dialog with a specified title to be opened.

This function waits for 10 seconds in case the dialog is not found to be open. (The wait will be made configurable in a future release). The title can be specified as a regular expression.

Double click on a list item of a specified list.

Double click on a table row of a specified table.

Double clicks on a tree. Supports regular expressions

For example: double_click_tree "tree_name","top level",/.*level/,"third level"

Edit a table cell at the specified coordinates. The coordinates are specified as a "<row>,<column>" - for example, "1,1"

Enter the specified text into a specified text field.

Checks that an internal frame with the specified title has been shown The title can be specified as a regular expression.

Enter a keystroke with the specified modifiers.

For example: key_stroke "Ctrl+Alt 0" for the modifiers "Control" & "Alt" and the key "0".

Moves a specified slider to the specified position

Navigate to a specified path in a menu item. Both menu bars and popup menus are supported.

The path needs to be specified as a string delimited by the > character. For example: "first level>second level>item". This function does not have regular expression support.

Right click on a list item of a specified list.

Right click on a table row of a specified table.

Right click on a tree item of the specified tree. Supports regular expressions

For example: right_click_tree "tree_name","top level",/.*level/,"third level"

Sends a test script to the Frankenstein Java runtime at the specified host and port.

Waits for the test to complete, and reports test results.

Select a specified value from a specified combo box.

Select a specified file in a file chooser.

Select multiple files in a file chooser.

Select a specified value in a specified list.

Selects the specified rows in a table. rows is a comma separated list of table rows.

Example: select_table_row "table_name" , "1,2,3"

Select a specified tree path. Supports regular expressions

For example: select_tree "tree_name","top level",/.*level/,"third level"

Stop editing a specified table.

Switch to a tab with the specified title of a specified tabbed pane. The title can be specified as a regular expression.

[Validate]