【发布时间】:2022-12-02 02:11:09
【问题描述】:
I've recently started a new mission to write e2e tests using cypress but... the application is iframe based (which I can deal with) but my issue is it also use a ton (and I mean A TON) of top.someFunction().
Those top.someFunction() are interfering with cypress since top. is considered as the cypress window and I endup with errors like top.someFunction() is not a function.
A huge refactoring doesnt seems an option from the developers perspective... I've already spent a lot of time trying to find a way to get it work but I'm starting to wonder if we shouldnt use another automation tool but I really want to use cypress...
I'm lost.
Do you have any suggestion?
【问题讨论】:
-
Can you post the test that gives you the error? I'm not having a problem accessing
top.someFunction()from a test. -
Question needs more details, as it stands it's not reproducible.
-
@TesterDick reproducing is not the goal... I'm saying when running cypress, the application is broken. Cypress is aware of that. I'm asking recommendations
-
The goal is to get an answer, but you need to provide adequate info. SO asks for questions that are minimal and reproducible, otherwise you are asking for guesses.
-
Just use a top.somefunction() in a web app, run it in cypress.
标签: javascript automation cypress end-to-end