-
Notifications
You must be signed in to change notification settings - Fork 674
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
TestCafe hangs on click of submit button in an iframe when the click is submitting form and redirecting to a page of a different domain #4232
Comments
Hi @lprasanthi, We would love to assist you and diagnose this issue. However, we need to reproduce this issue on our side in order to understand its cause. Without a simple sample project, we are unable to provide any solutions. |
Hi @alexey-lin I'm happy to help. I'll try to create a sample app and share it with you. |
@alexey-lin https://github.com/lprasanthi/TestCafe-ForgotPwd is the code for the test and README has instructions. |
@lprasanthi |
Hello, Is there an update on this one ? |
We cannot provide any estimates as to when it will be fixed. Stay tuned in this thread to be notified of our progress. |
bump |
@sjt003, thank you for your feedback. Please note that you can just react with +1 to the original post. It will help us keep the discussion clean and clear. |
Any update on this or possible work around? |
@Srutherford2407, We don't have any updates on this issue. In the meantime, you can use the workaround from this thread. |
Hi is there any update on this? Many thanks. |
@tomchan-bot test('Switch and submit', async t => {
await t.switchToIframe('iframe');
await ClientFunction(() => document.querySelector('input').click());
}); |
Hey, two things from me on this problem. We recently stumbled upon this and the issue makes most of our tests redundant :/
Hope this will add some insight 🤞 |
@biniosuaf Thank you for the information. We'll take it into account. |
Hello, |
@stella-jivkova This issue should not be reproducible. So, I assume that the problem you encountered is different. Could you share a small example so that we can investigate this on our side? |
@felis2803 the case is as follows: Upon some investigation with our FE Dev we were able to detect that the submit form has an event listeren, which scope is being changed by TestCafe. I'm attaching a comparison of how things differ between the automated executin via TestCafe and a manual scenario. Please, let me know if additional information is needed. EDIT: After trying to work around the issue, there's some important info to add - the <input> elements that fill the form data are not children of the form, but are separate elements also located inside the iframe. It looks like for some reason TestCafe is blocking the form's access to those elements. The workaround we've just found is to use ClientFunction() in order to recreate those elements as children of the form element and then use form.submit() directly, instead of triggering the submit with the Submit button. |
@stella-jivkova This is indeed a different bug that has similar symptoms. Please open a new issue. Also, please attach a link to a repository that reproduces this bug so that we can run it and investigate. |
Hi, |
Hi @chaithanyvv, This issue is resolved. Please create a separate issue with a simple sample. Also, please follow this instruction about creating simple examples. |
What is your Test Scenario?
We are testing a page that loads a form in an iframe from source (www.domain1.comapny.com/load).
User completes the form and submit's it to www.domain1.company.com/submit which then redirects to www.domain2.company.com/anotherform(within the same iframe).
Test hangs after submit. It submits and redirects to the new page(i can see in the UI) but is stuck there(window never closes and next steps are not executed).
What is the Current behavior?
What is the Expected behavior?
What is your web application and your TestCafe test code?
Web application is in ruby on rails framework.
Your website URL (or attach your complete example):
Unfortunately I can't share the code but I'm happy to share snippets and video if that helps.
Wanted to understand if this is a limitation with testcafe framework as it's redirecting to a cross domain.
Your complete configuration file (if any):
Your complete test report:
Screenshots:
Steps to Reproduce:
Your Environment details:
The text was updated successfully, but these errors were encountered: