Without non-component locators, recordings on non-components can break relatively easily. For example, clicking on a button in the Widgets.gui example (created using the Marimba Bongo toolkit) without using any non-component support produces the following JavaStar code:
JS.frame("Example Widgets").member("PlayerPanel").
multiClick(71,66,16,1);
This statement clicks on a screen location in the Bongo frame. This works, as long as the Bongo layout manager doesn't move any objects around. If the layout does change, the button will not be at recorded screen location (71,66) and the script will end in an exception.
When you record the same action using the non-component support module, the same JavaStar recording produces code that clicks on a specific object, not a screen location:
JS.frame("Example Widgets").member("marimba.gui.PlayerPanel").
getNonComponent("bongo","PopupWidget.Presentation%0.
FolderWidget%0.PageWidget%1.GroupBoxWidget%3.GroupWidget%0.
CommandButtonWidget%0").multiClick(5,10,16,1);
This code uses the benefits of object technology, and is much more robust. Now minor screen adjustments do not break existing test suites.
Send feedback to
JavaStar-feedback@suntest.com
Copyright © 1998
Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303.
All rights reserved.