Parameterize scripts to be many things

I like to know some ways to work with scripts that are parameterized. That is to say that one script can be tested with different contraints(Parameters). For example, if we want to run a script today with a certain department but tomorrow or next even with a different parameter(department). Now add a few other parameters, like use the same script to login as another user. Same script now we want to have an additional parameter like a different part/item. Do we really make copies of the same script and just run the different scripts?

Any suggestions?


You can parameterize a script by adding the params keyword followed by some parameter names that act as local variables in the script:

params myParam1, anotherParam

Click myParam1
TypeText anotherParam

Surprisingly, this was helpful and it inspired me what to do. Thank you