-
Notifications
You must be signed in to change notification settings - Fork 678
Description
What is your Scenario?
- Launch main window, perform some tests
- 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
-
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. (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. (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