screen resolution seems to change between runs on the same machine
We run our nightly tests on 2 separate machines, neither of which will necessarily display on a monitor while running (unless someone physically logs into that machine while the test is running). We have been having a lot of issues where sometimes the run will behave as expected and all objects are visible. On other runs, the resolution is different and some objects are now offscreen, causing lots of errors. In an attempt to figure out the issue, we wrote a script to create a warning when the resolution is not a multiple of 1920X1080 (to account for multiple monitors potentially being used when running tests manually). I have looked in our setup scripts to make sure nothing is changing the screen resolution there, and have found nothing. I also checked our scheduled tasks for something that would modify the screen res and found nothing there as well. We also restart our automation machines before running the tests each night. I understand that one of your answers in the past has been to add 'scroll into view' to objects that are sometimes offscreen but I have not had great luck with that function, sometimes it works for the object I need it for, and sometimes it doesn't. I recently had to add a fairly significant script to scroll something into view in a list if it is not already visible and/or existing in memory. I am just wondering if anyone else has had this issue and knows why the scripts would run as expected sometimes and in a different resolution other times.
Hi hrothrock
How are you running the nightly runs and are you using a session creator for this?
The session creator can be configured to start the user session, and be responsible for setting the display resolution
https://support.smartbear.com/testcomplete/docs/working-with/automating/session-creator/index.html
Check out the above and see how you could use the session creator to set the display resolution and avoid such issues from happening again.
Kr
Vinnie