-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimental-multiple-windows fails with Error: WebSocket connection closed on completion of some tests #8377
Comments
I updated the source code in the issue above to remove use of resizeWindow which is listed as not supported for --experimental-multiple-windows. |
FYI: My workaround was to call testcafe using the --test "testname" parameter for each individual test that needs multiple windows.
I did this using find, perl, and xargs. Your milage may vary.
We have auth and public tests which need to be executed separately, which is why the regex in the perl single line matches but doesn't capture auth, so that it only finds the right tests. |
Hello, Thank you for reaching out to us. I tried to run your example and encountered a different error related to invalid date creation. After a bit of debugging, I found that the buttonDate is invalid. The test also contains a significant amount of code that is unrelated to the issue. Additionally, try to place the await before the Selector, like so:
Please remove any unnecessary code and provide a minimal, updated version of the test so I can further investigate the issue. |
I have replaced the test script in the issue with a newly created minimal test script that shows the issue without extra code. |
What is your Scenario?
Use native automation to open places page on PhotoPrism.
Validate that searching for a location will return the map, with a cluster of photos for that location.
Zoom out.
Select the cluster, and then open another window from the browse button shown in the UI.
FYI:
Maps fail in non native automation due to an issue in hammerhead (already logged), so we are attempting to use the --experimental-multiple-windows flag for tests that use multiple windows.
What is the Current behavior?
On successful completion of the test (as per the console.log messages), the an error is thrown as testcafe is tearing everything down. The test that fails with a WebSocket connection closed is unpredictable.
What is the Expected behavior?
What is the public URL of the test page? (attach your complete example)
The public demo of PhotoPrism can be used for this test.
https://demo.photoprism.app/library/login is the initial landing page (no credentials required as this is a public demo).
The test also navigates to the following pages:
https://demo.photoprism.app/library/places
https://demo.photoprism.app/library/browse
What is your TestCafe test code?
Your complete configuration file
testcaferc.json
Your complete test report
Screenshots
No screen shots are taken as the test has already successfully completed, and testcafe fails as it tears the test down.
Steps to Reproduce
This command will run up to 10 times, but stop when the 1st failure is encountered.
The error is not consistent and can take a couple of executions to fail.
TestCafe version
11.1.0
Node.js version
v22.13.1
Command-line arguments
-- "chrome --headless=new" --skip-js-errors --experimental-multiple-windows ./tests/testcafeissue8377.js
Browser name(s) and version(s)
Chrome headless 133
Platform(s) and version(s)
Linux Ubuntu 24.10
Other
The test script above has been created to show the issue. It is pared back to the minimum required to show the issue.
Non Native Automation of maps fail as per this issue: DevExpress/testcafe-hammerhead#3041
which is why we are attempting to use --experimental-multiple-windows
The text was updated successfully, but these errors were encountered: