Parameterization of userid, password and server information
Need to figure out how to parameterize stuff (login, password, server name, etc.)
We are testing an application that requires a userid, password and server specific information and rather than record each time we'd like to be able to call a variable that points to a file where this info is.
Any help with this would be greatly appreciated!
Re: Parameterization of userid, password and server information
The best way is to create your own method for logging in. Here's the one I use:
public void login (String LOGIN, String PASSWORD)
To log in to my application, I just use this code:
The clickButtonByAlt is another custom function, so you'll have to substitute that with your own recorded clicking of the button. I've put my login method into a separate class, so in reality its actually:
eCommon ec = new eCommon();
Basicly, the parameterization works by replacing whatever string you want with a variable.
P.S. ... putting your login function and all common functions into a separate class (mine is a basic script file called eCommon) means that you only have to edit one place if your login screen changes. You can use this for many different tasks. Consider script writing just as you would code development. Code re-use and modularization are the keys to maintainable scripts. Otherwise, you'll end up with tons of scripts that break all the time.
[ 07-17-2003, 07:05 AM: Message edited by: cyblue ]