This functionality is supported only if you are using the Classic Agent.
There are several options that you can set for the Java extension by manually editing the javex.ini file. These options apply to SilkTest_Java3.jar only.
The settings go in the [Options] section of javaex.ini unless otherwise noted. These are optional and you do not have to include the setting in your javaex.ini if you want the default behavior.
Measured in milliseconds. The default value for this option is -1. This option applies only to AWT-based applications that contain AWT popup menus. It should not be used with other applications because it will slow performance. If your application contains AWT popup menus, then you should set this value to a positive number, for example 1000, to prevent Silk Test Classic from freezing when interacting with the AWT popup menus.
The default value for this option is TRUE for backward compatibility with previous versions of Silk Test Classic. This option applies only to AWT-based applications. It will not affect applications based on JFC (Swing). Setting the option to FALSE may significantly improve playback speed. However, it may change the window identifier hierarchy, which may cause existing tests to fail.
The option controls whether Silk Test Classic searches for peers of AWT controls. Peers are windows that represent counterparts to Java controls, but are not Java classes themselves. Examples of peer classes that you may see in your window declarations are SunAwtFrame or SunAwtCanvas. If the option is set to FALSE, Silk Test Classic does not recognize peer classes and does not include these classes in the window identifier hierarchy. You should not set the option to FALSE if any of your window declarations mention peer classes, otherwise you will have to change your existing test scripts to accommodate the modified window identifier hierarchy.
If the option is set to FALSE, Silk Test Classic recognizes most custom Java components without having to add their class names to the [ClassList] section of javaex.ini. There are two exceptions: custom components that have children, and custom components that are derived from ignored container classes such as Panel. In order to enable Silk Test Classic to recognize a component in one of those two categories, you must add the class name to the [ClassList] section of javaex.ini. For additional information, see Recording Classes for Ignored Java Objects. In order to identify the classes to add to the [ClassList] section, you may need to enable Show all classes on the Record Class dialog box and examine the resulting window declarations. You must remember to disable Show all classes before you modify the [ClassList] section. Never play back scripts with Show all classes enabled, or performance will slow down greatly.
The default value for this option is FALSE. The Java extension uses the component name as the window ID form of the tag. For most JFC (Swing) components, the component name is the component class name. For AWT components, however, the component name has the form base name + instance number. The base name resembles the component class name. For example, AWT Button has a base name of "button", while AWT Dialog has a base name of "dialog". The instance number reflects the order in which this instance of the component was created by the JVM. The order of creation, and therefore the instance number, may vary depending on the sequence of actions performed against the application. This may cause the window ID of a specific window to vary between runs of a test case, or even within a test case.
For example, the first time that you invoke a specific popup window, its window ID will be "dialog0" (base class = "dialog"; instance number = 0). But if you discard this popup window and then invoke it again, the window ID will be "dialog1". This will invalidate the window declaration if the window ID is the only tag form being used for that window. If IncludeInstanceNumber is set to FALSE (the default value), then the instance number will be omitted from the window ID, and the window ID will consist only of the base class. If there are multiple windows with the same base class, then the window ID’s will have the form "baseClass[n]", following the standard Silk Test Classic convention for distinguishing between multiple controls with the same tag value.
Setting the option to TRUE will reintroduce the Java instance number into the window ID tag form, which usually will make the window ID less robust. However, the option is included for purposes of backward compatibility.
The default value for this option is TRUE. This option specifies how the parent of a popup menu should be determined. When the option is set to TRUE (default), the parent of the popup menu will be the window that invoked it or the first ancestor of the invoking window that is not ignored by the Java extension. When the option is set to FALSE, the parent of the popup menu will be the container of the popup menu or the first ancestor of the container that is not ignored by the Java extension.
Recognition of popup menus should be more robust using the default value, TRUE, because that value will eliminate changes to the window hierarchy that occur when the container of a popup menu changes because the size or placement of the menu changes. Prior to the introduction of this option, the container was always used as the parent of the popup menu, corresponding to an option value of FALSE.
For example, for JFC (Swing) menus, the container by default is a panel. If the panel is ignored by the Java extension, as usually will be the case, and if Silk Test Classic is using the container as the parent (option value is FALSE), then Silk Test Classic will recognize the parent as the JavaMainWin that contains the menu. However, if the menu extends beyond the boundary of the JavaMainWin, then the container, and therefore the parent (if option value is FALSE) will be seen as a popup window (usually a JavaDialog). So if the option value is FALSE, then the parent of the menu may change depending on the size of the menu, causing the window declaration to be invalid. If Silk Test Classic is using the invoking window as the parent (meaning that this option is TRUE), however, then the parent will not change because the same window (usually the JavaMainWin) invokes the menu whether or not the menu lies within the boundaries of the JavaMainWin.
The default value, TRUE, also allows Silk Test Classic to distinguish between popup menus that are invoked in different contexts, for example by clicking different buttons in the same toolbar. The parent of the popup menu is the button that was clicked to bring up the menu. In contrast, setting the value to FALSE may cause popup menus invoked by clicking different buttons in a toolbar to be seen as children of the same JavaMainWin, and therefore to be seen as part of the same popup menu.
The default value for this option is FALSE. This option, which is part of the [JavaJFCTable] section of the javaex.ini file, determines how Silk Test Classic obtains the cell text for JavaJFCTable controls. The default value, FALSE, uses the cell renderer object to find the cell text for non-string cell contents, such as for a cell that contains a custom component that displays text but does not implement toString(). If Silk Test Classic does not return the correct table cell text with the value set to FALSE, then change the value to TRUE. Setting the value to TRUE causes Silk Test Classic to use the cell data object rather than the renderer object.
The default value for this option is FALSE. This option, which is a part of the [JavaJFCTreeView] section of the javaex.ini file, determines how Silk Test Classic obtains the node text for JavaJFCTreeView controls. With this option set to FALSE, Silk Test Classic attempts to find meaningful text for the tree node by relying more heavily on the Java API. If Silk Test Classic does not return the correct tree node text with the value set to FALSE, then change the value to TRUE. Setting the value to TRUE gives precedence to the string representation of the value of the node, even if that value does not yield apparently meaningful text.
The default value for this option is FALSE. This option lets you specify how Silk Test Classic should expand/collapse nodes in a JavaJFCTreeView. The default value, FALSE, specifies that Silk Test Classic should double-click nodes to expand or collapse them. This value works for default implementations of a JavaJFCTreeView. However, if your implementation of a JavaJFCTreeView does not use a double-click to expand or collapse nodes, then set the value to TRUE, which directs Silk Test Classic to click on the Expand button, which usually is a small square with a +/- sign.