Test Cafe Script Still throwing JS Errors #8101
Labels
STATE: Need clarification
An issue lacks information for further research.
TYPE: bug
The described behavior is considered as wrong (bug).
What is your Scenario?
As reported in #8067 the Apple Pay use case is not working on testcafe.
I built testcafe with the hammerhead proxy patch and getting a different JS error
errStack: 'Must create a new ApplePaySession from a user gesture handler.\n' + 'ApplePaySession@[native code]\n' + '_startApplePaySession@https://applepaydemo.apple.com/static/js/docCustomizedSession.js:136:32\n' + 'startApplePaySession@https://applepaydemo.apple.com/static/js/docCustomizedSession.js:98:24\n' + '@https://applepaydemo.apple.com/static/js/fixed-demo.js:48:25\n' + 'onclick@https://applepaydemo.apple.com/:1072:24\n' + 'dispatchEvent@[native code]\n' + 'dispatchEvent@https://192.168.29.183:55216/hammerhead.js:40271:61\n' + '@https://192.168.29.183:55216/hammerhead.js:40955:33\n' + '@https://192.168.29.183:55216/hammerhead.js:40885:41\n' + '@https://192.168.29.183:55216/hammerhead.js:40827:41\n' + 'dispatch@https://192.168.29.183:55216/hammerhead.js:40611:87\n' + '@https://192.168.29.183:55216/hammerhead.js:40635:25\n' + '@https://192.168.29.183:55216/hammerhead.js:40967:36\n' + '@https://192.168.29.183:55216/testcafe-automation.js:3904:39\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4106:41\n' + 'step@https://192.168.29.183:55216/testcafe-automation.js:206:35\n' + '@https://192.168.29.183:55216/testcafe-automation.js:155:61\n' + '@https://192.168.29.183:55216/testcafe-automation.js:148:79\n' + 'invokeResolver@https://192.168.29.183:55216/hammerhead.js:52:12\n' + 'Promise$1@https://192.168.29.183:55216/hammerhead.js:189:17\n' + '__awaiter@https://192.168.29.183:55216/testcafe-automation.js:134:42\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4101:29\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4098:31\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4194:41\n' + '@https://192.168.29.183:55216/testcafe-automation.js:4224:48\n' + 'invokeCallback@https://192.168.29.183:55216/hammerhead.js:68:21\n' + 'forEach@[native code]\n' + 'publish@https://192.168.29.183:55216/hammerhead.js:155:40\n' + 'publishFulfillment@https://192.168.29.183:55216/hammerhead.js:160:10\n' + 'asyncFlush@https://192.168.29.183:55216/hammerhead.js:25:20', pageDestUrl: 'https://applepaydemo.apple.com/', id: 'dJ8mABQ'
This error does not come without Test Cafe and website works fine too.
I tried things like
mousedown
and touchstartevent
but it didn't helpWhat is the Current behavior?
JS error coming on clicking the Apple Pay Button.
What is the Expected behavior?
No errors should come, and should move to next flowthe
What is the public URL of the test page? (attach your complete example)
https://applepaydemo.apple.com/
What is your TestCafe test code?
`
fixture("e2e")
.page("https://applepaydemo.apple.com/");
test("End to End Scenario", async (t) => {
await t.click(Selector('.applePayButtonContainer'));
await new Promise((res, _) => setTimeout(res, 80000));
})
`
Your complete configuration file
No response
Your complete test report
No response
Screenshots
Steps to Reproduce
TestCafe version
Custom with latest hammerhead proxy
Node.js version
v16.20.2
Command-line arguments
testcafe safari -e test.js --ssl pfx=testingdomain.pfx;rejectUnauthorized=true;
Browser name(s) and version(s)
Safari 15.6.1
Platform(s) and version(s)
macOS 12.6.2
Other
No response
The text was updated successfully, but these errors were encountered: