Forum Discussion

sb1's avatar
sb1
Occasional Contributor
6 years ago

Creating a simple Web App Testcase in a laptop and running it in a desktop - different resolutions

I created a simple web app testcase ( Open a URL, enter user id and password, enter the website, click the logout button) in my laptop and tested it from the same machine successfully. I had to loop it and run for multiple users.

Then i moved the project to a different machine ( a desktop, which only had cpu and no monitor) and remotely executed the case from my laptop. It worked fine as long as my screen was active and available. But as soon as disconnected the remote connection, my rest of the cases started failing as no screen was available and the testcase was not able to find the user id and password fields in the login screen.

 

Have you guys faced a similar situation? What i am understanding from my case is that as long as my monitor was available it was running and was able to locate the fields using the x,y co-ordinates and when my monitor was no longer available the desktop was trying to find the user id  and password fields at the same co-ordinates in the default resolution of the desktop, which of course will not be at the same position and hence my cases failed.

 

Any workaround for this scenario?

 

5 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Oh so many things here  :)

     

    But as soon as disconnected the remote connection, my rest of the cases started failing as no screen was available and the testcase was not able to find the user id and password fields in the login screen.

    Correct.  If you can't see the screen, then TestComplete can't see the screen.

     

    it was running and was able to locate the fields using the x,y co-ordinates

    You really don't want to use coordinates.  It's ok when you first record a test, but as you have just found out the hard way, it's not going to work on multiple machines.  Use object information and name mapping to locate fields and everything else.

     

    Any workaround for this scenario?

    https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/overview.html

    • sb1's avatar
      sb1
      Occasional Contributor

      Maybe the object mapping is also there along with co-ordinates.

       

      Clicks at point (60, 13) of the 'textboxId' object.

       

      So should i remove the co-ordinates and just keep object mapping?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Co-ordinates aren't part of object mapping.  They are part of the action.  Remove the co-ordinates or replace each with -1 and you should be fine.

        But the problem you described is, quite simply, a lack of an unlocked, logged in user session with an AI.  You NEED to have that... without that, I don't care what the screen resolution is... it will fail.

  • Just reread some of the posts in the thread.  There is a common thread (see what I did there ? :smileytongue:) through the links posted all related to RDP support from Smartbear .You may also want to look at this smartbear article.  When tests run without any graphical component through RDP, you need to make a change to your registry so windows doesn't disable some stuff:

     

    RDP in minimised window