New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS modified in wrong manner #7415
Comments
Thank you for reporting this. I was able to reproduce the issue. Please also read about the new TestCafe option that is available in the https://www.npmjs.com/package/testcafe/v/2.1.1-alpha.2 version and newer. TestCafe runs tests using the URL-rewritten proxy. // Command-line
testcafe chrome tests --experimental-proxyless
// Programmatic
const testcafe = await createTestCafe({ experimentalProxyless: true });
// Configuration file
{
"experimentalProxyless": "true"
} Note that at present it is an experimental mode. |
Hi, TypeError: Cannot read properties of undefined (reading 'Fetch') I'm on Windows 11, Chrome 108 |
it's a node issue, I was using NodeJS 18. But my test is failing on login page. The click on submit is working, page is loading but Testcafe is still searching for the button and is failing. In an other test, it's failing on .beforeEach |
Hi @tandreys
Yes, we have a known issue related to the Node.js@18.x version.
Could you please share a simple example that we can run locally? |
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. |
What is your Scenario?
Some functions are failing only under Testcafe.
Take that code
var a=0;
var b = function(){
a++;
return a;
}
var t={1: 0, 2:0};
for (var i=0;i<2;i++){
t[b()] +=1;
}
console.log(a);
console.log(t);
What is the Current behavior?
a=0;
var b = function(){
a++;
return a;
}
var t={1: 0, 2:0};
for (var i=0;i<2;i++){
__set$(t,b(),__get$(t,b())+1) ;
}
console.log(a);
console.log(t);
giving
4
Object {1:1, 2: 0, 3:NaN}
What is the Expected behavior?
2
Object { 1: 1, 2: 1 }
What is your public website URL? (or attach your complete example)
<script> var a=0; var b = function(){ a++; return a; } var t={1: 0, 2:0}; for (var i=0;i<2;i++){ t[b()] +=1; } console.log(a); console.log(t); </script>What is your TestCafe test code?
fixture
Sandbox
test('repro', async t => {
await t.navigateTo("file:///C:/temp/repro.html");
})
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
TestCafe version
2.1.0
Node.js version
tried with latest 14,16 and 18
Command-line arguments
testcafe "chrome" repro.js -d
Browser name(s) and version(s)
chrome, firefox, edge
Platform(s) and version(s)
Windows 11, Ubuntu 20
Other
you can see t[b()] += 1; is transformed to __set$(t,b(),__get$(t,b())+1), and the value of a is not expected in testcafe, because the function b is not idempotent (it changes a every time).
The text was updated successfully, but these errors were encountered: