Skip to content
Discussion options

You must be logged in to vote

Hi,

you can pass variables in following way

when run cypress

npx cypress run --env yourVariable=value

and use it in test

const var = Cypress.env('yourVariable');

for more details read following article https://docs.cypress.io/guides/guides/environment-variables#Setting

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stephenmday
Comment options

Answer selected by stephenmday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants