Skip to content

[🐛 Bug]: Parallel tests have access to wrong window #15699

Open
@yareg

Description

@yareg

Description

Hello,
I have issue, related to [🐛 Bug]: Running tests in parallel in docker causing tests to choose the wrong open window

When I try to run parallel tests in different nodejs processes, get error

 - The following exception occurs:
 Error :  {
    "name": "ElementClickInterceptedError",
    "message": "element click intercepted: Element <div _ngcontent-fno-c54=\"\" class=\"csf-table-cell csf-table-col--site\">...</div> is not clickable at point (533, 364). Other element would receive the click: <div _ngcontent-fno-c9=\"\" class=\"ngx-spinner-overlay ng-tns-c9-0 ng-trigger ng-trigger-fadeIn ng-star-inserted ng-animating\" style=\"background-color: rgba(200, 200, 200, 0.6); z-index: 99999; position: fixed;\">...</div>\n  (Session info: chrome=135.0.7049.84)",
    "stack": "ElementClickInterceptedError: element click intercepted: Element <div _ngcontent-fno-c54=\"\" class=\"csf-table-cell csf-table-col--site\">...</div> is not clickable at point (533, 364). Other element would receive the click: <div _ngcontent-fno-c9=\"\" class=\"ngx-spinner-overlay ng-tns-c9-0 ng-trigger ng-trigger-fadeIn ng-star-inserted ng-animating\" style=\"background-color: rgba(200, 200, 200, 0.6); z-index: 99999; position: fixed;\">...</div>\n  (Session info: chrome=135.0.7049.84)\n    at Object.throwDecodedError

...

which also indicates, that test it trying to access window from another test window.

Chromium runs with options:

--no-sandbox
--disable-dev-shm-usage
--enable-automation
--disable-extensions
--disable-client-side-phishing-detection
--no-default-browser-check
--no-first-run

Selenium Grid launch with docker-compose:

---
services:
  chrome:
    image: selenium/node-chrome:latest
    platform: "linux/amd64/v2"
    shm_size: 2gb
    depends_on:
      - selenium-hub
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_NODE_MAX_SESSIONS=10
      - SE_NODE_OVERRIDE_MAX_SESSIONS=true
    restart: unless-stopped

  selenium-hub:
    image: selenium/hub:latest
    platform: "linux/amd64/v2"
    container_name: selenium-hub
    environment:
      - SE_NODE_MAX_SESSIONS=10
      - SE_NODE_OVERRIDE_MAX_SESSIONS=true
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"
    restart: unless-stopped

Tests are run using selenium-webdriver for JS binding. The driver built this way and each test runs using separate nodejs process.

Any ideas, what I'm doing wrong?

Reproducible Code

const builder = new Builder();  
const capabilities = {  
    acceptInsecureCerts: true,   
    enableVNC: true,  
    enableVideo: false,  
    timeZone: this.driverSettings.timeZone || Constants.defaultTimeZone,  
    [browserKey]: {  
        args: [  
            '--no-sandbox',   
            '--disable-dev-shm-usage',   
            '--enable-automation',   
            '--disable-extensions',   
            '--disable-client-side-phishing-detection',   
            '--no-default-browser-check',   
            '--no-first-run'   
        ],  
        prefs: {  
            'plugins.always_open_pdf_externally': true,  
            download: {  
                'promt_for_download': false,  
                'default_directory': path.join(  
                    path.isAbsolute(this.driverSettings.traceDir) ? '' : path.resolve('.'), this.driverSettings.traceDir || 'traceDir',  
                    moment(new Date()).format('YYYYMMDD'), 'reports'  
                ),  
                'directory_upgrade': true  
            }  
        }  
    }  
};

const driver = builder  
    .usingServer('[http://localhost:4444/wd/hub')](http://localhost:4444/wd/hub%27\) "http://localhost:4444/wd/hub%27)")  
    .withCapabilities(capabilities)  
    .build();

Debugging Logs

Debug info sessionId + capabilities for 1 and 2 tests
2 sessionId  479ddbd467f94a9f182c458cc5ccd59e
1 sessionId  e256fef7aa98957e081fbdba9284ee58
2 capabilities  Capabilities {
  map_: Map(27) {
    'acceptInsecureCerts' => true,
    'browserName' => 'chrome',
    'browserVersion' => '135.0.7049.84',
    'chrome' => {
      chromedriverVersion: '135.0.7049.84 (6c019e56001911b3fd467e03bf68c435924d62f4-refs/branch-heads/7049@{#1778})',
      userDataDir: '/tmp/.org.chromium.Chromium.PTVEyv'
    },
    'fedcm:accounts' => true,
    'goog:chromeOptions' => { debuggerAddress: 'localhost:34593' },
    'networkConnectionEnabled' => false,
    'pageLoadStrategy' => 'normal',
    'platformName' => 'linux',
    'proxy' => {},
    'se:bidiEnabled' => false,
    'se:cdp' => 'ws://172.19.0.3:4444/session/479ddbd467f94a9f182c458cc5ccd59e/se/cdp',
    'se:cdpVersion' => '135.0.7049.84',
    'se:containerName' => 'c53d473ed72f',
    'se:noVncPort' => 7900,
    'se:vnc' => 'ws://172.19.0.3:4444/session/479ddbd467f94a9f182c458cc5ccd59e/se/vnc',
    'se:vncEnabled' => true,
    'se:vncLocalAddress' => 'ws://172.19.0.3:7900',
    'setWindowRect' => true,
    'strictFileInteractability' => false,
    'timeouts' => { implicit: 0, pageLoad: 300000, script: 30000 },
    'unhandledPromptBehavior' => 'dismiss and notify',
    'webauthn:extension:credBlob' => true,
    'webauthn:extension:largeBlob' => true,
    'webauthn:extension:minPinLength' => true,
    'webauthn:extension:prf' => true,
    'webauthn:virtualAuthenticators' => true
  }
}
1 capabilities  Capabilities {
  map_: Map(27) {
    'acceptInsecureCerts' => true,
    'browserName' => 'chrome',
    'browserVersion' => '135.0.7049.84',
    'chrome' => {
      chromedriverVersion: '135.0.7049.84 (6c019e56001911b3fd467e03bf68c435924d62f4-refs/branch-heads/7049@{#1778})',
      userDataDir: '/tmp/.org.chromium.Chromium.rdB2hC'
    },
    'fedcm:accounts' => true,
    'goog:chromeOptions' => { debuggerAddress: 'localhost:35519' },
    'networkConnectionEnabled' => false,
    'pageLoadStrategy' => 'normal',
    'platformName' => 'linux',
    'proxy' => {},
    'se:bidiEnabled' => false,
    'se:cdp' => 'ws://172.19.0.3:4444/session/e256fef7aa98957e081fbdba9284ee58/se/cdp',
    'se:cdpVersion' => '135.0.7049.84',
    'se:containerName' => 'c53d473ed72f',
    'se:noVncPort' => 7900,
    'se:vnc' => 'ws://172.19.0.3:4444/session/e256fef7aa98957e081fbdba9284ee58/se/vnc',
    'se:vncEnabled' => true,
    'se:vncLocalAddress' => 'ws://172.19.0.3:7900',
    'setWindowRect' => true,
    'strictFileInteractability' => false,
    'timeouts' => { implicit: 0, pageLoad: 300000, script: 30000 },
    'unhandledPromptBehavior' => 'dismiss and notify',
    'webauthn:extension:credBlob' => true,
    'webauthn:extension:largeBlob' => true,
    'webauthn:extension:minPinLength' => true,
    'webauthn:extension:prf' => true,
    'webauthn:virtualAuthenticators' => true
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!B-gridEverything grid and server relatedC-nodejsJavaScript BindingsD-chromeI-defectSomething is not working as intendedOS-mac

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions