Handling multiple SUT processes
Happened with IE but not with Chrome:
SUT has a modal popup that is another process, and TESTAR tries to bring original process to foreground and that does not work because of modal popup.
The popup element must be this or one that works similarly: https://www.w3schools.com/jsref/met_win_alert.asp
Note: The alert box takes the focus away from the current window, and forces the browser to read the message. Do not overuse this method, as it prevents the user from accessing other parts of the page until the box is closed.
If you run this popup window and use TESTAR to connect with Windows_Title, you detect it. However, it is a process different from the SUT, it's not easy to work with these windows.
At the moment I'm using this piece of code taken from DefaultProtocol to close the window if we lose focus(on DeriveActions method):
I think I need to look into handling multiple processes as Ponsse GUI has at least 2 processes.
The SUTProcesses setting has been refactored to allow the connection with multi-processes SUTs #388
The TESTAR user can indicate with regular expressions which processes conform to the SUT
https://github.com/TESTARtool/TESTAR_dev/wiki/3-TESTAR-configuration-and-settings#connect-with-a-multi-processes-sut-advanced-dialog