The macro system can record mouse and keyboard events for procedures you’ve developed to test your application. Macros allow you to run your test cases on updated versions of your application without having to manually work through the test cases each time.
Some additional menu items are available to help you use the macro system to test your application. To access these additional items in test mode or with the runtime engine, add the ShowAdvancedMacroMenu=TRUE setting to the defaults file. To access these additional items from within Dexterity, hold down the shift key and choose Play from the Macro menu. Click Cancel in the dialog box that appears. The next time you display this menu, five additional items will have been added to it. If you quit and restart your application, the Macro menu will return to its original size.
We strongly recommend that you don’t tell your customers about the additional items in the Macro menu. These items are for developer use only. |
This menu item opens the Macro Status window.
When a macro is being recorded, the Macro Status window will list the name of the macro and how many lines it currently has.
When a macro is being played, the Macro Status window lists the name of the macro and the line currently being executed. The StandardInternationalInfo option will be checked when standard international information is being used while the macro is running. The status of this check box is determined by the StdInternationalInfo setting in the DEX.INI file and can’t be changed by the user.
The Windows Compatibility option will be marked automatically and should remain marked when macros are being run on Windows. For other platforms, marking the Windows Compatibility option allows controls to behave more like those in Windows. This helps minimize incompatibilities when macros recorded on Windows are played back on other platforms.
The No User Interface Flash option will prevent the momentary pause that normally occurs to make push buttons appear as if they have been pressed. Removing this pause will allow macros to be executed more quickly.
The Macro Status window also allows you to begin executing a macro at a specific line or insert a pause after a specified line. To start a macro at a specific line, enter the line number in the Jump to Line field and click OK, or double-click the line in the scrolling window. To pause after a specific line, enter the line number in the Pause After Line field.
The scrolling window at the bottom of the window displays the lines in the macro. The scrolling window is useful when you want to start a macro at a specific line or when you’re trying to locate an error in a macro.
Because macros can be lengthy, by default only the first ten lines of the macro are displayed. To allow more than ten lines to be displayed, enter the number of the last line you want to display in the Lines to Display field and press the TAB key. The scrolling window will then be able to display from the first line in the macro to the line you specified. To begin displaying a macro from a specific line, enter the line number in the Jump To Line field and press the TAB key.
For example, to display line 435 of a 2000-line macro, enter 500 in the Lines to Display field and press the TAB key to allow the first 500 lines of the macro to be displayed. Enter 435 in the Jump to Line field and press the TAB key. After a moment, the scrolling window will begin displaying the macro at line 435.
Choosing this item while recording a macro inserts a command to save an image of an application’s currently active window as a graphics file. When the macro is run on different versions of the application, the images from each version can be compared to ascertain whether the results are the same.
The Window Dump menu item opens a dialog box allowing you to name the graphics file to which the image of the current window will be saved. It also inserts a command into the macro to save the image when the macro is played. The image will be saved as a PC Paintbrush (.PCX) file.
Choosing this item while recording a macro inserts a command to save the names and contents of all fields in the currently active window to a text file. When the macro is run on different versions of the application, the text from each version can be compared to ascertain whether the results are the same.
The Field Dump menu item opens a dialog box allowing you to name the text file to which the names and contents of fields in the current window will be saved. It also inserts a command into the macro to save the fields’ contents.
Field dumps must not be taken when a change is made to a field and the focus remains on it. The field dump will not reflect the change made to the field until the focus leaves the field. |
Choosing this item while recording a macro inserts a command to save selected fields to a text file. A dialog box will be displayed, allowing you to name the text file to which the names and contents of fields will be saved. Dexterity will switch to field selection mode, allowing you to click on the fields whose contents you want saved. When you have selected the fields you want, choose Stop Selecting from the Macro menu, or press ESC.
Choosing this item while recording a macro inserts a command to save the names and contents of all form-level menus that are attached to the currently-active form to a text file. A dialog box will appear, allowing you to name the text file in which the menu information will be saved. When the macro is run on different versions of the application, the text from each version can be compared to determine whether the results are the same.
Choosing this item while recording a macro inserts a command to save the names and contents of all menus in the currently active application to a text file. A dialog box will appear, allowing you to name the text file in which the menu information will be saved. Form-level menus will be listed after application-level menus in the text file. When the macro is run on different versions of the application, the text from each version can be compared to determine whether the results are the same.
Choosing this item while recording a macro inserts a command to save the names and contents of all toolbars currently displayed to a text file. A dialog box will appear, allowing you to name the text file.
Choosing this item while recording a macro inserts a command to save the background HTML document to a text file. A dialog box will appear, allowing you to name the text file in which the information will be saved. This is used when testing the “Home Page” functionality in an application.
Choosing this item while recording a macro inserts a command to save the contents of the MDI shell (main runtime window) to an XML file. A dialog box will appear, allowing you to name the text file. This can be useful when testing the navigation in an integrating application.
Choosing this menu item opens the Table Export window. This window allows you to export the contents of a table to a text file. During testing, the contents of the text file can be compared with previous versions to find out if any differences have occurred.
Choosing this item opens the Macro Open Form window. This window allows you to open a specific form without having to record the steps necessary to open it using the application’s interface. This allows you to record macros that are independent of the navigation in the application.
This menu item opens a window allowing you to specify information about the macro being recorded. This information can include a description of the macro, a list of the windows that must be open, or any other preconditions necessary for the macro to run properly. The information you enter in this window is saved in comment lines at the beginning of the macro file.
This menu item opens a window allowing you enter comments for the macro being recorded. Each time you add a comment, it is saved as a comment in the next line of the macro file.