Randomly I get unable to find the main window. I have to restart the computer to get it to work again.
Using
LunchOrAttach("someapp.exe")
app.GetWindow("title")
It is a windows form app
Most of the time it works but every now and then it give an error unable to find the main window.
For windows server 2008 the problem appears unfortunately but when I test on windows server 2012/2016 the problem appears very frequently. using same exact code on both os.
Also I am running the code as a windows service in an interactive mode under the local system account
Randomly I get unable to find the main window. I have to restart the computer to get it to work again.
Using LunchOrAttach("someapp.exe") app.GetWindow("title")
It is a windows form app
Most of the time it works but every now and then it give an error unable to find the main window.
For windows server 2008 the problem appears unfortunately but when I test on windows server 2012/2016 the problem appears very frequently. using same exact code on both os.
Also I am running the code as a windows service in an interactive mode under the local system account