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

Replace x.top: experimentalSourceRewriting does not solve the issue on Cypress: "13.15.0" #30421

Open
fderraz opened this issue Oct 18, 2024 · 0 comments

Comments

@fderraz
Copy link

fderraz commented Oct 18, 2024

Current behavior

Hello,

My Cypress test fails because the home page is not loaded:
(uncaught exception)TypeError: top.getTabFrom is not a function
(uncaught exception)TypeError: top.getParamWindow is not a function

The following error originated from your application code, not from Cypress. > top.getTabFrom is not a function

I addedto the cypress.json file, the following params: “experimentalSourceRewriting”: true
Except that it doesn't fix my problem

Version Cypress: "13.15.0"

Any suggestions you may have to solve this problem, will be appreciated :)

Error

Please find enclosed my code: Test.cy.js
The following code snippet corrects the loading problem, except that it's not a relevant solution because the win.top is used everywhere in the application under Test ==> it's not possible to include it after each click.

cy.window().then((win) => {
win.top.getTabFrom = win.top[0].getTabFrom;
win.top.getParamWindow = win.top[0].getParamWindow;
});

Test

Desired behavior

Display the content of the Home Page

Test code to reproduce

Test

Cypress Version

13.15.0

Node version

v20.18.0

Operating System

Windows 10 Professionnel

Debug Logs

No response

Other

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant