Forum Discussion

asmatullah's avatar
asmatullah
Contributor
12 years ago

Error Message : The Operation cannot be performed ,because the desktop is invisible .

Hi Experts ,



I am getting the error message as mentioned above .I am starting execution from server  to a remote machine using TestExecute .

Is there any specific setting to do on the remote machine .

I am not able to do testing because of this problem .



7 Replies

  • It may be that you need to have a desktop available for the test to run - the way I do this is to always have an RDP window open to the machine where TestExecute is running from another machine.  I use Jenkins - so I have an RDP window open from the Jenkins master machine to the Jenkins slave machine where the test is actually running.
  • marin's avatar
    marin
    Frequent Contributor


    Hello Khan,



    we have a similar test environment setup - TestExecute is installed on a remote machine and runs independently and without user interaction.



    Our idea was to be able to start the test in the afternoon or evening hours and let the tests run during the night without monitoring.



    So we ended up with the follwing:

    - the machine where TestExecute is installed and running is available via RDP (A)

    - the RDP to machine A is opened from any other machine (B) -> machine B must be  running 24/7. 

    - on the machine B (where RDP to A is opened from) a registry setting must be made to support minimized desktop:



    HKEYLOCALMACHINE

           -> SOFTWARE

                  -> Microsoft

                        -> Terminal Server Client -> RemoteDesktop_SuppressWhenMinimized = 2 (DWORD)



    In this scenario user connects via RDP from machine B to machine A and starts the test project run in TestExecute.

    Then he minimizes the RDP window on machine B - thus having the RDP in the task bar.



    We actually use RDP also to the machine B from any local machine (e.g. test engineers or other staff in charge):

    - RDP from any local machine to machine B

    - RDP from B to A

    - start test on A

    - minimize RDP on B

    - close RDP to B on local machine (closing via "X", not logging off)

    - power off local machine



    This way user can start the test execution, power off his local machine and leave his desk after COB wihout having to monitor the process.



    Hope this helps,



    Marin

     


  • Hi - I'm not sure how to specifically solve your issue - but if you google the subject of needing a desktop available for GUI automation tests in general (this isn't a TestComplete/TestExecute specific issue), you should find some ideas.   Essentially, the user running the TestExecute process need a desktop available to it for the automation to work.  As I said in my previous post, the way I do that is to have an RDP window open onto the machine where TestExecute is running.
  • jan_muczyn's avatar
    jan_muczyn
    New Contributor


    Hi Everyone



    We have had a similar problem and solved this very similarly to what Marin proposed. However, we have noticed this caused another issue. We are using Microsoft Lync for company communication and having the mentioned registry key added to machine B (I assume this is my workstation in this scenario) prevents me from using Shared Desktop functionality of Lync - I can share my screen with others, but I am disallowed to accept any 'incoming' share request - "Application sharing failed because media failed to set up correctly" error is displayed (according to Microsoft website this indicates RDP connection failed to be established). Removing the registry key solves this problem.

    Anyone knows if it would be possible to have both those functionalities working (desktop being available on minimized RDP connection and Lync working correctly)?



    Thanks


  • Hi Tony ,



    I have batch files which runs froms Jenkins trigger and I execute process remotely from Server .

    So how to handle the given problem in this context .


  • Thanks Marin ,



    I tried your solution but it didn't work for me . I am getting the same problem .....



    Trying out Tonys solution 

    Now I am working on a solution where I am trying the system to remain unlocked .

    Because when I run the tests when system is unlock , tests are getting executed perfectly .