morficus / cypress-dotenv

Cypress plugin that enables compatability with dotenv
53 stars 13 forks source link

cypress-dotenv not working #35

Open RAMKI14 opened 1 year ago

RAMKI14 commented 1 year ago

Hi,

I have installed cypress-dotenv and followed the instructions, still not working. Implementing this in cypress, cucumber-bdd, with the page object model.

Added below code in the cypress.config.js const dotenvPlugin = require("cypress-dotenv"); module.exports = (on, config) => { config = dotenvPlugin(config); return config; };

Calling it in the test: cy.log(Cypress.env("CYPRESS_HELLO"));

But it is printing as below in the log-in test runner: log

nicojones commented 1 year ago

Probably because it's developed for Cypress<10