Ask a Question

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

sb1
Occasional Contributor

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 5
tristaanogre
Esteemed Contributor

TestComplete, like ALL UI based functional testing tools, actually interacts with the components on the desktop.  So, in order to actually perform the tests, there must be an active, logged in user session.  The work around is dependant somewhat on your technology but here is a starting place.

https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlock...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Marsha_R
Community Hero

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


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
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
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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
RUDOLF_BOTHMA
Community Hero

Just reread some of the posts in the thread.  There is a common thread (see what I did there ? Smiley Tongue) 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


-------------------------------------------------
Standard syntax disclaimers apply
Regards,
cancel
Showing results for 
Search instead for 
Did you mean: