Parameters aren't only useful for data entry and comparisons--you can also use them to determine the component in a window you want to take action on.
For example, in the acceptance test are three nodes--ClearDisplay, Add, and Close--that click a button in a window. In their current states, these scripts are re-usable (in fact, the test uses ClearDisplay three times) but only if you want to click that particular button in that specific window.
To make a more versatile script to replace these three, you can write a script that clicks a button in a window. The label of the button to click and the name of the frame where the button should be can be passed as parameters. This reduces three scripts to one (easier to maintain) and make the single script highly re-usable.
Send feedback to
JavaStar-feedback@suntest.com
Copyright © 1998
Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303.
All rights reserved.