DevExpress / testcafe

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

Issue with button click with experimentalProxyless=true #7535

Closed aprabh001c closed 1 year ago

aprabh001c commented 1 year ago

What is your Scenario?

When experimentalProxyless=true, testcafe is not clicking _search button mentioned in below script ( or after clicking browser is not responding) and it fails

This is related to https://github.com/DevExpress/testcafe/issues/6861 (without experimentalproxyless mode we are hitting issue #6891)

Script Used to reproduce with Public Website import {t, Selector} from 'testcafe'

fixture UnHandledException

test(UnhandledExceptionTC, async tn=>{ const _addressField = Selector('#Address_SingleStreetAddress,input[name="localizationAddressField"]'); const _search = Selector(".localization-container button[type='submit']");

await t.navigateTo("https://www.xfinity.com/learn/offers"); await t.wait(10000); await t.typeText(_addressField,"200 MAIN ST, NORTHAMPTON, MA 01060",{paste:true}) await t.wait(2000) await t.click(_search) await t.expect(_search.visible).notOk();

})

What is the Current behavior?

button not clicked or not responding

What is the Expected behavior?

Should proceed to next step

What is your public website URL? (or attach your complete example)

https://www.xfinity.com/learn/offers

What is your TestCafe test code?

import {t, Selector} from 'testcafe'

fixture UnHandledException

test(UnhandledExceptionTC, async tn=>{ const _addressField = Selector('#Address_SingleStreetAddress,input[name="localizationAddressField"]'); const _search = Selector(".localization-container button[type='submit']");

await t.navigateTo("https://www.xfinity.com/learn/offers"); await t.wait(10000); await t.typeText(_addressField,"200 MAIN ST, NORTHAMPTON, MA 01060",{paste:true}) await t.wait(2000) await t.click(_search) await t.expect(_search.visible).notOk();

})

Your complete configuration file

experimentalProxyless=true

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

import {t, Selector} from 'testcafe'

fixture UnHandledException

test(UnhandledExceptionTC, async tn=>{ const _addressField = Selector('#Address_SingleStreetAddress,input[name="localizationAddressField"]'); const _search = Selector(".localization-container button[type='submit']");

await t.navigateTo("https://www.xfinity.com/learn/offers"); await t.wait(10000); await t.typeText(_addressField,"200 MAIN ST, NORTHAMPTON, MA 01060",{paste:true}) await t.wait(2000) await t.click(_search) await t.expect(_search.visible).notOk();

})

TestCafe version

2.3.0

Node.js version

19.3.0

Command-line arguments

testcafe chrome -F UnHandledException

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

AlexKamaev commented 1 year ago

Thank you for the example. I managed to reproduce the problem. The actual issue is not with the click action, but with some XHR request that is related to the click action. We'll research it.

patrickathompson commented 1 year ago

I am also experiencing this issue. After enabling proxyless mode in 2.4.0, a button click is no longer functioning. Proxyless mode is needed because the page cannot be tested with hammerhead-js due to its bugs.

AlexKamaev commented 1 year ago

@patrickathompson the original issue is very specific. It's unlikely that you have a similar one. Please create a separate issue and share an example using this template

AlexKamaev commented 1 year ago

@aprabh001c I cannot reproduce the issue anymore. Please try updating your TestCafe version to 2.5.0 and try the test again.

github-actions[bot] commented 1 year ago

This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone.

aprabh001c commented 1 year ago

Hi Thank you for your response I am able to see this issue in 2.5 as well. Node version - 18.16.0 Browser - Chrome 112.0.5615.138 configuration: "nativeAutomation": "true" Please let me know if i need to provide more details

with "nativeAutomation": "false", we are seeing same issue search button is not clicked

AlexKamaev commented 1 year ago

I've recorded a video to demonstrate that TestCafe handles a button click correctly. Please take a look at the attached video file. Please also try using the following TestCafe version: https://www.npmjs.com/package/testcafe/v/2.5.1-rc.1 If the issue persists, record a video that demonstrates the issue. Use the following command to record such a video: npx testcafe chrome test.js -e --native-automation --video artifacts

https://user-images.githubusercontent.com/1678902/235848409-ccbeefc7-42e5-43d9-b4d2-ea4df8bc0875.mp4

aprabh001c commented 1 year ago

I am not seeing this issue with 2.5.1-rc.1 version, but hitting another issue, which is not related to this. I will raise a new issue for that. Thank you for your support.