Forum Discussion
While running automation scripts i am using window object to maximize the browser window so that there should not be any problem in verifying the UI Content.. So when i close the remote desktop there is no active window available, At that point script is trying to maximize the browser window while lead to the error.
Unable to create or maximize new browser object: Exception: A window size operation failed because the window is not currently available
This is expected for a closed remote connection. TestComplete utilizes the UI interface of the Windows environment in order to interact with applications under test. by closing the remote desktop, the UI is no longer available, hence the error you're getting.
The article you linked in your original message is the best answer to your problem. I use it regularly. When I start a test on my remote VM it is part of a batch file in which the first step is to run the script code in that article to transfer the desktop session to the console.
If this isn't working, then there is something different in your environment architecture. Are you connecting to a VM or to another physical machine?
- anjalirai137 years agoNew Contributor
Yeah, I am using VM.
- tristaanogre7 years agoEsteemed Contributor
So, before you disconnect your VM, you need to transfer the session to the console. The way I do that is with a batch file so that when I run it, it redirects the session and then kicks off my tests.
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do ( %windir%\System32\tscon.exe %%s /dest:console ) "C:\Program Files (x86)\SmartBear\TestExecute 12\Bin\TestExecute.exe" "my.PJS" /r /e /SilentMode
- anjalirai137 years agoNew Contributor
As i said earlier I tried this way but it is not working. I referred this solution from the article already mentioned in my question.
Related Content
Recent Discussions
- 3 days agoMW_Didata