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
Error: "TypeError: window.location.toString is not a function" #2178
Comments
Hello @jsnanigans , Thank you for submitting the issue. I've managed to reproduce it. We will research it and update this thread as soon as we have any results. |
I've researched this issue and created a simplified example. The problem occurs when the focus method is called on some element from a removed iframe. <body>
<script>
var iframe = document.createElement('iframe');
iframe.addEventListener('load', function () {
var body = iframe.contentDocument.body;
document.body.removeChild(iframe);
body.focus();
});
document.body.appendChild(iframe);
</script>
|
I cannot reproduce this issue. |
Easier Issue DebuggingThis fork I made: https://github.com/nottoseethesun/hammerhead_testcafe_error uses the latest Temporary WorkaroundAs long as the In the case of React though for example, if the So, separately, to unblock myself I am going to try to workaround by wrapping the code where The minified file in question is The patched file can be copied over to replace the original at |
Thank you for the shared information. We will investigate it. |
The issue has been reproduced here:
https://github.com/jsnanigans/hammerhead_testcafe_error
What is your Test Scenario?
Speculation: A iframe is focused, the iframe sends a message to the main window, the main window closes the iframe before testcafe can focus the main window.
What is the Current behavior?
error is thrown and prevents react from rendering
What is the Expected behavior?
the main window is focused in testcafe and continues as usual
What is your web application and your TestCafe test code?
The issue has been reproduced here:
https://github.com/jsnanigans/hammerhead_testcafe_error
Steps to Reproduce:
Your Environment details:
testcafe -c 1 chrome tests/Sample.ts --skip-js-errors
The text was updated successfully, but these errors were encountered: