-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
DOM elements not found in origin block #23076
Comments
Hi @scharoltaGB. Thank you for opening an issue. This one might be tricky to reproduce on my end, but what I am thinking is there is a race condition where the |
Hi! Thanks for your reply. I tried adding an explicit wait but unfortunately it did not fix this issue for me. The issue you linked absolutely sounds like a similar problem. Do you know when a fix is planned for this? |
I don't believe we have an ETA on a fix, but it is a known issue that we need to solve with redirects happening while transitioning origins. Did this code ever work for you and we introduced a regression or did you implement this originally in |
Hi again! We implemented this originally in 10.3.1 (also tested in 10.4.0 - just updated the ticket to indicate this) as we recently changed our login logic to use an external login provider which requires this. |
@scharoltaGB OK I believe that makes sense. That would make the most sense since the issue should still exist in 10.3.1 and earlier. |
possibly related to #22282 |
Possibly some additional information... I was experiencing the same behavior on 10.4.0 trying to test an emulated Firebase Auth flow. It turns out it was fixed by ensuring the redirect happened after the I originally got to this code trying to identify issues:
For this, the Removing the
Note that the One idea that might solve some of these issues is to have |
@fastfedora my guess to what was happening with your issue is that |
@scharoltaGB I forgot to ask... for the redirect, is it a client side or server side redirect (301/302)? Also, is your |
It's a 302 redirect and yes, baseUrl is set :) |
Current behavior
I am using cy.origin() to login with an external login provider. My case is very similar to this block (taken from this issue)
However, the cy.get in the origin block (in this example cy.get('#login-button').click()) always fails to find the relevant DOM element. If I run this statement outside of the origin block, the element is found successfully but the test fails later as I need this origin.
Desired behavior
cy.get should also be able to find the relevant element in the cy.origin block.
Test code to reproduce
Cypress Version
10.3.1, 10.4.0
Other
No response
The text was updated successfully, but these errors were encountered: