If I use the login() method, passing my credentials in to the username and password fields, everything works just fine.
But when I try to reference those same exact same values by using Cypress.env('username') and Cypress.env('password) - the authentication fails everytime.
I've tried toString() and encodeURI() but to no avail. Any ideas are welcome!
I'm trying to hide my credentials using https://github.com/bahmutov/as-a
If I use the
login()
method, passing my credentials in to theusername
andpassword
fields, everything works just fine.But when I try to reference those same exact same values by using
Cypress.env('username')
andCypress.env('password
) - the authentication fails everytime.I've tried
toString()
andencodeURI()
but to no avail. Any ideas are welcome!