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 tag "My App" 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 tag "Login" // the declarations for the Login window go here PushButton OK tag "OK"
About the derived keyword and scope resolution operator
Notice the statement derived::Invoke ( ). That statement uses the derived keyword followed by the scope resolution operator ( :: ) to call the built-in Invoke method, before performing the operations needed to fill in and dismiss the login window.