Forum Discussion

3sV's avatar
3sV
Occasional Contributor
1 month ago

Elements detected but is beyond the screen.

Using Chrome Version 145.0.7632.117. We want to test with the latest version.
Using TestComplete Version: 15.76.5.7 x64

TLDR; version

browser.BrowserWindow.Maximize();

Maximize() makes my test fail because it thinks an object is off screen. Logging the browser position I see negative left and top results. The object is also outside the browser window.
Anyone else has this?

Long version

I only have this issue when I maximize the browser window.
Logging: Browser window position and size L,T,W,H = -8,-8,1910,911

Then my search box was not clickable, although I could see it on my screen.
Logging error: There was an attempt to perform an action at a point, which is beyond the screen. 

Logging the position and size of the search box reveled that it indeed was going of screen
Logging: Search box position and size L,T,W,H = 2600,336,186,31

Seems related to Elements detected, clicked in wrong location with Chrome | SmartBear Community but was requested to create new post.

My temp solution: setting a fixed browser window within the bounds of the window.

var browserWnd = Sys.Browser("chrome").BrowserWindow(0);
browserWnd.Restore();
browserWnd.Position(Left, Top, Width, Height);

6 Replies

  • Hassan_Ballan's avatar
    Hassan_Ballan
    Icon for Champion Level 3 rankChampion Level 3

    Based on what you’re describing and the similar reports in other threads, this looks more like an environment or display configuration issue than a pure supported Chrome version problem.

    A few things I would suggest checking:

    First, confirm the effective DPI using command line rather than relying only on the Windows UI. Open Command Prompt and run:

    wmic desktopmonitor get PixelsPerXLogicalInch,PixelsPerYLogicalInch

    If the value returned is 96, that equals 100% scaling. If you see higher numbers like 120 or 144, then scaling is above 100%, which can cause coordinate misalignment issues even if Display Settings appears correct.

    Second, test with only a single monitor connected and ensure the browser launches on the primary display. Additional or previously configured displays can affect coordinate calculations.

    Third, try clearing the TestComplete user settings by renaming the folder %LocalAppData%\SmartBear\TestComplete and then launching TestComplete again. This will reset local configuration and browser integration settings, which can sometimes resolve machine-specific coordinate issues.

    If this resolves your scenario, marking it as the solution helps future readers find it quickly.

    • 3sV's avatar
      3sV
      Occasional Contributor

      Hassan_Ballan​ 
      To answer your questions.

      1. DPI is ok, cmd prompt returned 96.

      2. Can't really check because its a remote desktop witch adjust to the screen size available, a little less than 1920 x1080. My Jenkins pipeline also had the same issue and it uses a fixed screen size of 1920 x 1080.

      3. Cleaned the %LocalAppData%\SmartBear\ folder. It helps, but only for the first run, all runs after that have the same issue again. 

      [TestComplete] Test runner exit code: 2.
      [TestComplete] [WARNING] Error: There was an attempt to perform an action at a point, which is beyond the screen..
      [TestComplete] [WARNING] Errors occurred during the test execution.

      The search box VisibleOnScreen property returns false, and search box size L,T,W,H = 2510,328,186,31 is supposedly of screen. Although the browser shows this correct.

      • Hassan_Ballan's avatar
        Hassan_Ballan
        Icon for Champion Level 3 rankChampion Level 3

        Since DPI is confirmed at 96, this no longer looks like a scaling issue. The large X coordinate (~2500) and the fact that cleaning %LocalAppData%\SmartBear\ only fixes the first run suggest this may be a window state or coordinate synchronization issue after using Maximize(), especially in RDP or CI environments.

        I would avoid BrowserWindow.Maximize() and instead explicitly restore and set the window size using Position(0, 0, 1920, 1080). In remote or VM sessions this is typically more stable than maximize.

        As a workaround, since clearing %LocalAppData%\SmartBear\ helps on the first run, you could add a step in your CI pipeline to clear that folder before starting TestComplete.

        If this started after moving to Chrome 145, you could also temporarily fall back to a previously supported and stable browser version to see if the behavior changes.

        If the issue persists, I would recommend opening a support case with SmartBear so they can investigate a potential Chrome 145 + TestComplete 15.76 interaction.

        Finally, if you are accessing a VM from a desktop with a single monitor setup, make sure both the host machine and the VM have matching DPI and resolution settings. In remote scenarios, mismatched scaling or display configurations between host and VM can still cause coordinate inconsistencies even when resolution appears correct.

        Also, can you confirm whether this reproduces on a local non-VM desktop machine?

        If this resolves your scenario, marking it as the solution helps future readers find it quickly.

  • 3sV's avatar
    3sV
    Occasional Contributor

    Hassan_Ballan​ thank you for your reply. My reply on your message wasn't saved so I added it again for completeness. To answer your questions:

    First, the command prompt returned 96.

    Second, couldn't really verify the monitors because I used a remote desktop. My Jenkins pipeline used fix screen ration 1920 x 1080 and had the same issue.

    Third, cleaning the LocalAppData%\SmartBear\ folder had a positive effect.

  • detached310's avatar
    detached310
    Occasional Contributor

    I get the same numbers, -8x-8, looking a Chrome window with Microsoft SpyXX, on my laptop.

    Same with Mozilla Firefox.

    I understand that as saying that the maximized window starts outside of the screen to hide the window border, which is not shown when the window is maximized...