Message - The operation cannot be performed, because the user session is locked.

Applies to TestComplete 15.63, last modified on April 23, 2024

When does the error occur?

You get this message when you are trying to run a test and the user session is locked.

Why is the message shown?

TestComplete cannot run a test if the appropriate session is locked. Possible reasons that may cause this message to appear are:

  • You are running a test via Remote Desktop and the Remote Desktop Connection session is locked.

  • The UAC (User Account Control) prompt is displayed and asks for user confirmation. In this case, the user session is automatically locked until you provide a response to this prompt.

Workarounds

To prevent the Remote Desktop Connection session from locking
  • Do not disconnect from the Remote Desktop while the test is running.

  • On the remote computer where you run your tests, do the following:

    • Disable the screen saver.
    • Disable the power saving options that may turn off the computer or its display, such as Put the computer to sleep.
    • Disable the Windows logon screen.

For more information on running tests via Remote Desktop, see the topics of the Running Tests via Remote Desktop section.

To resolve session locking caused by UAC
  • Confirm the user account manually and then try to perform the operation again.

– or –

See Also

Running Tests via Remote Desktop
About Running Tests via Remote Desktop

Highlight search results