Forum Discussion

Florian_Hofmann's avatar
8 years ago

Team Foundation Server: TestComplete fails to access GUI objects

Hello everyone,

I'm trying to run TestComplete tests via Team Foundation Server, calling a batch script with command line commands as in

This works fine as long as I call the script on the Server where TC is installed, logged in remotely.


If I call the batch skript as a build step in TFS, the test starts running, performing nun-GUI tasks like logging the first messages. As soon as the test tries to click the first GUI button, the test fails saying "The operation cannot be performed, because the user session is non-interactive".

When I started the same scripts using Windows' task schedule; there was a similar problem that could be solved as explained in, but I fail to find an analogue solution for tfs.


Thanks in advance,


6 Replies

    • Florian_Hofmann's avatar

      Thanks a lot, this looks like it's worth trying...tomorrow.

      I'll keep you updated if it finally solved the problem and mark your post as answer if it does.

      • tristaanogre's avatar
        Esteemed Contributor

        Starting it as interactive is the first step. However, you will still need to make sure that there is a user session logged in with some sort of active UI available. You don't necessarily need to have a monitor up and running or anything like that but you can't click on a UI if there is no UI.