Skip to content
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

cy.origin cannot find selector if same origin as top. #22942

Closed
mjhenkes opened this issue Jul 26, 2022 · 1 comment
Closed

cy.origin cannot find selector if same origin as top. #22942

mjhenkes opened this issue Jul 26, 2022 · 1 comment

Comments

@mjhenkes
Copy link
Member

Current behavior

If you create a spec bridge in the same origin as top, you are unable to interact with the window.

Desired behavior

I know this is a weird edge case but theoretically there shouldn't be a reason why someone couldn't write this example and have the spec bridge find the selector.

Test code to reproduce

it('cannot find the selector', () => {
  cy.visit('http://www.foobar.com:3500/fixtures/auth/index.html') // Establishes primary origin
  cy.origin('http://foobar.com:3500', () => {
    cy.get('[data-cy="login-idp"]') // It fails to find the selector.
  })
})

You can execute this test in the driver code.

Cypress Version

10.3.1

Other

No response

@nagash77
Copy link
Contributor

We will throw an error in this instance

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants