DevExpress / testcafe

A Node.js tool to automate end-to-end web testing.
https://testcafe.io
MIT License
9.81k stars 668 forks source link

Chrome: Launching Sub-window throwing Unhandled promise rejection #8258

Open aprabh001c opened 3 weeks ago

aprabh001c commented 3 weeks ago

What is your Scenario?

  1. Launch main window, perform some tests
  2. Launch sub window and close sub window

What is the Current behavior?

Launching subwindow throwing Unhandled promise rejection, all assertion and steps are passing, but end of test it is giving Unhandled promise rejection

What is the Expected behavior?

Test should not throw Unhandled promise rejection

What is the public URL of the test page? (attach your complete example)

https://testcafe.io/ https://www.google.com

What is your TestCafe test code?

test(sameple test,async tn=>{ await t.navigateTo('https://testcafe.io/') const url = "https://www.google.com"; const mainWindow = await t.getCurrentWindow(); const childWindow = await t.openWindow(url); await t.wait(5000); await t.closeWindow(); })

Your complete configuration file

No response

Your complete test report

sameple test

1) Unhandled promise rejection:

  Error: WebSocket connection closed
  at D:\xxxxxx\node_modules\chrome-remote-interface\lib\chrome.js:94:35
  at Chrome._handleConnectionClose (D:\xxxxx\node_modules\chrome-remote-interface\lib\chrome.js:256:13)
  at WebSocket.<anonymous> (D:\xxxxxx\node_modules\chrome-remote-interface\lib\chrome.js:243:22)
  at WebSocket.emit (node:events:517:28)
  at WebSocket.emit (node:domain:489:12)
  at WebSocket.emitClose (D:\xxxxxx\node_modules\ws\lib\websocket.js:246:10)
  at Socket.socketOnClose (D:\xxxxxxx\node_modules\ws\lib\websocket.js:1148:15)
  at Socket.emit (node:events:517:28)
  at Socket.emit (node:domain:489:12)
  at TCP.<anonymous> (node:net:350:12)

Screenshots

No response

Steps to Reproduce

test(sameple test,async tn=>{ await t.navigateTo('https://testcafe.io/') const url = "https://www.google.com"; const mainWindow = await t.getCurrentWindow(); const childWindow = await t.openWindow(url); await t.wait(5000); await t.closeWindow(); })

TestCafe version

3.6.2

Node.js version

18.20.2

Command-line arguments

testcafe 'chrome --disable-search-engine-choice-screen' --disable-http2 --disableNativeAutomation --concurrency 1 -F Sample_fixture

Browser name(s) and version(s)

Chrome 127.0.6533.120

Platform(s) and version(s)

Windows

Other

I have tried with both Native Automation with experimental multi window flag as well

github-actions[bot] commented 3 weeks ago

We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.

aprabh001c commented 3 days ago

Hi Team, Thank you for your support, any ETA for this issue.

Bayheck commented 10 hours ago

Hello,

Personal predictions can be unreliable, so we are not ready to give you an ETA. Once we make more progress, we will follow up here.