Is it possible to inject Javascript code to DOM before/during a Cypress test and run the injected code? #23515
Unanswered
kaphula
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
My use-case is that I'd like to write Javascript code (that uses my custom library) inside the Cypress tests. The way I do this normally is that I have the
index.html
file where I just declare a<script>
block and insert the code I want to run inside. Theindex.html
file that Cypress loads can execute the loading of my library and the custom code that uses this library fine when that code already exists in theindex.html
, but can I manipulate the code that will be executed inside the Cypress tests?Beta Was this translation helpful? Give feedback.
All reactions