I am creating some automated test scripts to test a piece of software. Im doing this in a modular way so that I can more easily dictate which scripts are being and change this, while having all the scripts pre-compiled
I have a script which is launched with parameters from a batch, this opens up my compiled script which enters in the login details and presses OK to any dialogs that may appear. This part works as intended.
At the end of the script I am trying to re-gain focus onto the main application window, set the window to fullscreen and then run the next batch file to perform the next test etc.
in this example "$practice" refers to the main application's window title, which I have derived using the AutoItv3 Info tool.
WinWaitActive($practice)
$hWnd = WinGetHandle($practice)
; FullScreen
WinSetState($practice,"",@SW_RESTORE)
WinSetState($practice,"",@SW_MAXIMIZE)
RunWait(@ComSpec & " /c " & "TestStart.bat")
However, this is not regaining focus and maximising the window as expected, i think the applications splash screen could be interfering.
If I manually Click into any part of the application to focus on it, then the dialog will be set to fullscreen and then my second script will run.
What should I do to make this last part of the script behave as I wish?