TestCafe device emulation doesn't resize Chrome browser with Node v17+
See original GitHub issueWhat is your Scenario?
I’m trying to run a TestCafe 1.17.1 test using Chrome “iPhone X” device emulation using Node v17 (Node is installed via nvm on a Macbook Pro).
What is the Current behavior?
After upgrading to Node v17.0.1 or v17.2.0 (latest), running TestCafe tests with “iPhone X” device emulation results in the Chrome browser no longer resizing. (Chrome’s window size remains the default desktop viewport.) If I run the same test with Node v16.9.1, device emulation works correctly (window resizes).
What is the Expected behavior?
Expect device emulation in latest TestCafe to keep working with Node v17+.
What is your public website URL? (or attach your complete example)
http://devexpress.github.io/testcafe/example
What is your TestCafe test code?
fixtureGetting Started.pagehttp://devexpress.github.io/testcafe/example;
test(“My first test”, async (t) => {
await t.typeText(“#developer-name”, “John Smith”).click(“#submit-button”);
});
Your complete configuration file
// package.json { “name”: “testcafe-helloworld”, “version”: “1.0.0”, “description”: “”, “main”: “index.js”, “scripts”: { “test”: “echo "Error: no test specified" && exit 1” }, “keywords”: [], “author”: “author author@example.com”, “license”: “UNLICENSED”, “dependencies”: { “testcafe”: “^1.17.1” } }
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
- Create a new test subdirectory
- Run:
npm init -y - Install & save TestCafe:
npm install --save testcafe - Make a
testssubdirectory. - Copy above test file into
tests\hello.jsfile - Run test using “iPhone X” device emulation:
node_modules/.bin/testcafe "chrome:emulation:device=iphoneX" tests/hello.js -e --hostname 127.0.0.1
TestCafe version
1.17.1
Node.js version
v17.2.0
Command-line arguments
“chrome:emulation:device=iphoneX” -e --hostname 127.0.0.1
Browser name(s) and version(s)
Chrome v96.0.4664.55
Platform(s) and version(s)
macOS Catalina 10.15.7
Other
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (2 by maintainers)

Top Related StackOverflow Question
Hi there,
Can confirm that I am seeing this issue on Node 17.3.0 as well. Here is my system information:
Thank you for the additional information! We have no news regarding this issue at the moment. We will update this thread once we have something to share.
I raised the frequency level for this issue, which gives it an increased priority during future plannings.