Forum Discussion

sunjj03's avatar
12 years ago

I got "User session has invalid state" error when the test complete was started by a service.

When I tried to start "Test Complete 9.0"by a windows service, and when we start the service, we checked the "Allow service to interact with desktop" option to make the GUI could be shown in the interactive mode.

Then when the service started, we can see Test Complete launched and run the script correctly. But when the test tried to click on the UI button, it failed with the error msg "User session has invalid state".

So it seems Test Complete could not get the UI control correctly by starting from a service.



Does anyone know any to solve this problem? 

  • Hi Lydia,


     


    As far as I know, enabling the Allow service to interact with desktop option doesn't allow TestComplete to work correctly with the tested app's GUI. Please refer to this forum thread where this question has already been discussed.