-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
ReferenceError: _cuprite is not defined #219
Comments
Getting this very frequently on CI (never locally) which makes us reconsider using this project. Happy to try to patch but not sure where to start. I did notice that this error seems to occur right after switching to an iframe. |
Turned out that adding a |
That might be the case, but overall I had a few workarounds just because Chrome doesn't work properly and doesn't load scripts before loading the page https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-addScriptToEvaluateOnNewDocument I can try to check if this changed because that was long time ago. |
Seeing this randomly too with iframes. |
Also facing the same issue since I have upgraded from 0.14.2. Adding |
Actually, even with |
I hit the same issue and after some investigation realized that this is because Cuprite's extensions (source) were not properly injected into the new window opened during a test. This seems to be a bug in Chrome itself because Ferrum actually does inject the extensions and I double-checked this by debugging I tried manually injecting extensions as a workaround, but it didn't work reliably:
What did work though, is refreshing the driver after switching to the new window:
|
Since upgrading Cuprite to 0.14.3 and Ferrum to 0.13.0, we're seeing intermittent errors in our RSpec runs on Github Actions. We are not seeing errors like this locally.
Failure/Error: click_on 'Get started' Ferrum::JavaScriptError: ReferenceError: _cuprite is not defined
Would appreciate any tips on mitigating this.
The text was updated successfully, but these errors were encountered: