Thanks for the reply NisHera.
As I understand (let me know if wrong..)
1) you have many programs starting same way -Correct
2) Some will pop-up log on window -Correct
3) When pop-up, need different log on details... -Logins are the same for the testing I'm doing.
4) you are scripting with jScript or JavaScript. -I'm using DelphiScript
5) you need generic code to handle log on window/dialog -Correct
On my perspective it's not a good practice to handle those with OnUnexpectedWindow event, because you are expecting those log-on.
My suggestion is write a common function in (jScript ) and call it when ever appears log on dialogue. If JavaScript you can have a class which would inherit a log on function. How do I call it just when that login appears?
I assume you know which program you suppose to run. and you know program need log on or not. If so you have to just call common log on function with matching parameters. This could change, so I want to make a generic way to login as opposed to hard coding it into each test.
Basically, if any of the programs prompts for a log in, I want it handled, but I don't want to hard-code that into every single test, because we have 20 programs. Each of those have their own test types and test projectss. Smoke, Regression, Funtional... I'd like to have a single event handler in each project that took care of logins.
Thanks,
R