White browser window appears when running testcafe in headless mode
silkdemon opened this issue · 1 comments
What is your Scenario?
I run tests in headless mode using flag chrome:headless
What is the Current behavior?
when i run testcafe in headless mode opens up new browser and hangs with white screen until i close it manually
What is the Expected behavior?
on previous week no screens appeared
What is the public URL of the test page? (attach your complete example)
this doesnt matter, any public page in healdess mode
What is your TestCafe test code?
fixture`test`.page('https://github.com/DevExpress/testcafe');
test('test', async (t) => {
t.request('https://github.com/DevExpress/testcafe');
});
Your complete configuration file
no config files used
Your complete test report
No response
Screenshots
Steps to Reproduce
- Run test in headless mode with command
npx testcafe chrome:headless .\PATH_TO_TEST_FILE
TestCafe version
3.6.2
Node.js version
v20.14.0
Command-line arguments
npx testcafe chrome:headless .\PATH_TO_TEST_FILE
Browser name(s) and version(s)
Chrome 129.0.6668.59
Platform(s) and version(s)
Windows 11 Pro
Other
No response
Hello @silkdemon,
This issue is related to ChromeDriver and is not specific to TestCafe. It was also reported in the ChromeDriver issue tracker.
As a workaround, you can use the --headless=old
flag to run Chrome in the old headless mode or hide the window (set the position off-screen with the --window-position=-2400,-2400
flag for this purpose).
npx testcafe 'chrome --headless=old' .\PATH_TO_TEST_FILE
npx testcafe 'chrome "--window-position=-2400,-2400"' .\PATH_TO_TEST_FILE