Although a non-Web application’s main window is usually displayed first, it is also common for a login or security window to be displayed before the main window.
Use the wStartup constant and the Invoke method
To handle login windows, record a declaration for the login window, set the value of the wStartup constant, and write a new Invoke method for the main window that enters the appropriate information into the login window and dismisses it. This enables the DefaultBaseState routine to perform the actions necessary to get past the login window.
You do not need to use this procedure for splash screens, which disappear on their own.
// First window to appear when application is invoked // const wStartup = ?
After following this procedure, your test frame might look like this:
window MainWin MyApp locator "/MainWin[@caption='MyApp']" const wStartup = Login // the declarations for the MainWin should go here Invoke () derived::Invoke () Login.Name.SetText ("Your name") Login.Password.SetText ("password") Login.OK.Click () window DialogBox Login locator "/DialogBox[@caption='Login']" // the declarations for the Login window go here PushButton OK locator "OK"