-
Notifications
You must be signed in to change notification settings - Fork 660
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
Dynamically-created iframe with the file:
protocol is not loading properly
#7983
Comments
+1 on this - macOs experiences the same issue, and prevents us from having all our jobs running on the testcafe same version |
Please modify your example a little. Try to remove file system paths from the .page("http://localhost:8080/hostApp.html") createIframe(document.body, "http://localhost:8080/iframe.html") Then, please launch the http-server module from your project directory.
It is working on my side. |
There are no file system paths per se since all paths are relative (but you're right that the original ends up being a local file URL). Starting the server and changing the path to The provided test case worked fine in Chrome in 1.x and 2.x so this is a regression. You can see this by running As for the Firefox issue being difficult to deal with, the main.ts file simply imports Highcharts (a popular charting library: https://www.highcharts.com/) and that's enough to cause the issue. I don't have the source so I can't whittle it down further. All I can say is it has something to do with |
I agree that the described behavior is not expected, so we can consider it as a bug. I recommend that you use the described workaround until the issue is fixed. As for the FF issue, please create a separate ticket using the following link: https://github.com/DevExpress/testcafe/issues/new?assignees=&labels=TYPE%3A+bug&projects=&template=bug_report.yaml. |
OK thanks, I trimmed this one to not mention Firefox, and created a Firefox-specific bug at #7991. |
FYI I noticed you added the "HAS_WORKROUND" flag. The workaround does indeed work around the issue, but we wouldn't be able to use it in our context, so this bug prevents us from upgrading to 3.x. |
@drrnkin We understand your point, so that's why we consider this issue a bug. Even though we use this label to plan our workload, the |
file:
protocol is not loading properly
file:
protocol is not loading properlyfile:
protocol is not loading properly
I researched the issue and found that it can be resolved by adding the
I checked your usage scenario, and it works as expected. Please try to use this approach and share your results with us. |
Yes, that workaround did pass for me. To be clear I locally modified the provided sample as follows (escaped quotes are important).
and then ran "yarn test-chrome". Some points to consider:
|
Please note that Native Automation mode is enabled only in Chromium-based browsers (Chrome, Edge, etc.). You don't need to add this option to other browsers. |
Thanks, I confirmed that creating a
Just a suggestion -- I wonder if TestCafe could automatically disable that feature by itself when it encounters a |
I'm happy to hear that the workaround resolved the issue for now.
TestCafe cannot disable that feature automatically. However, we will discuss how to improve user experience with the Native Automation mode. |
This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open. |
Commenting to remove stale state |
What is your Scenario?
A test loads a page that dynamically inserts an iframe. element and loads that content. The iframe fails to be recognized.
What is the Current behavior?
In Chrome, the iframe can be seen to load correctly (if you watch), but TestCafe can't detect this and issues the message "Content of the iframe in which the test is currently operating did not load.". Note that in versions 1.x and 2.x Chrome worked correctly, but it's changed in 3.x.
What is the Expected behavior?
Simple test at https://github.com/drrnkin/testcafe-iframe should pass. The test should detect the content in the iframe that is dynamically created by a script in the iframe. Note that the test passes in Chrome in TestCafe 1.x or 2.x, but not 3.x.
Expected: test should pass in both Chrome and Firefox. Note that there's a related bug for Firefox #7991
What is your public website URL? (or attach your complete example)
https://github.com/drrnkin/testcafe-iframe
What is your TestCafe test code?
See provided repo
Your complete configuration file
See provided repo
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
TestCafe version
3.3.0
Node.js version
v16.20.2
Command-line arguments
See Steps to Reproduce
Browser name(s) and version(s)
Chrome 116.0.5845.111 (currently latest)
Platform(s) and version(s)
Windows 10
Other
No response
The text was updated successfully, but these errors were encountered: