question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TestCafe device emulation doesn't resize Chrome browser with Node v17+

See original GitHub issue

What 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

  1. Create a new test subdirectory
  2. Run: npm init -y
  3. Install & save TestCafe: npm install --save testcafe
  4. Make a tests subdirectory.
  5. Copy above test file into tests\hello.js file
  6. 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:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
torrinworxcommented, Jan 12, 2022

Hi there,

Can confirm that I am seeing this issue on Node 17.3.0 as well. Here is my system information:

Screen Shot 2022-01-12 at 9 42 31 AM
0reactions
VasilyStrelyaevcommented, Sep 26, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Browsers | Concepts | Guides | Docs - TestCafe
Emulate a Device; Emulate Screen Size; Use Emulation in Headless Mode ... in a remote browser, you cannot take screenshots or resize the...
Read more >
testcafe | Yarn - Package Manager
A Node.js tool to automate end-to-end web testing.
Read more >
testcafe/CHANGELOG.md - UNPKG
36, testcafe chrome my-tests --test-meta device=mobile,env=production ... 423, * Resizing Chrome in the emulation mode works correctly ...
Read more >
testcafe - npmfs
TestCafe now takes screenshots using browsers' debug protocols ... Resizing Chrome in the emulation mode works correctly ...
Read more >
Source - GitHub
TestCafe cannot switch to iframes that descend from a shadowRoot element ... /using-testcafe/common-concepts/browsers/using-chrome-device-emulation.html), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found