DevExpress / testcafe

A Node.js tool to automate end-to-end web testing.
https://testcafe.io
MIT License
9.82k stars 671 forks source link

Running Chrome Device Emulation w/ Tablets not able to perform left clicks anymore #8150

Closed sam-yh closed 7 months ago

sam-yh commented 7 months ago

What is your Scenario?

Using Chrome device emulation with a "tablet device" (iPad, Kindle), suddenly left clicks are not performed anymore, instead it seems they are "turned into" right clicks

What is the Current behavior?

When using Chrome browser emulation with a tablet device, left click commands behave like right click commands

What is the Expected behavior?

Left clicks should be executed as left clicks, always, including when running with Chrome's device emulation mode for tablets.

What is the public URL of the test page? (attach your complete example)

https://testcafe.io/

What is your TestCafe test code?

import { Selector } from 'testcafe'

fixture`Repro`.page`${'https://testcafe.io/'}`
test('Repro', async (t) => {
  await t.click(Selector('.burger')).wait(50000)
})

Run this with e.g.: testcafe chrome:emulation:device=iPad path/to/file.js

Your complete configuration file

module.exports = { 
    disableMultipleWindows: true,
    }

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. Create a test file with the given code snippet
  2. Run the with the given command-line arguments
  3. Observe what happens on the click action

TestCafe version

3.5.0

Node.js version

20.11.1

Command-line arguments

testcafe chrome:emulation:device=iPad

Browser name(s) and version(s)

Chrome 122.0.6261.69

Platform(s) and version(s)

Ubuntu 22.04.3

Other

I assume this is probably not a Testcafe bug. But posting this just for the off-chance there is some connection to the Testcafe codebase or the case that maybe someone else runs into this issue and can point out the actual causes.

PavelMor25 commented 7 months ago

Hello @sam-yh,

I can't reproduce the issue on my machine (Chrome 122.0.6261.69 / Ubuntu 22.04 / nodeJS 20.11.1) Maybe you can specify the details that can help us reproduce the problematic behavior.

sam-yh commented 7 months ago

Thanks for your reply! I found out that it depends on this configuration file option being set to true As soon as I comment this option out, the issue is not reproducible anymore. Can you please retry with "disableMultipleWindows": true in your .testcaferc.js? Updating my post above.

github-actions[bot] commented 7 months ago

We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.

Bayheck commented 7 months ago

Hello, We found that the issue was already fixed by the following merged PR:

https://github.com/DevExpress/testcafe/pull/8135/files

The fix will be available in the next TestCafe release.