Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use System Environment Variables in Angularjs Protractor?

My plan is to store a username and password as system environment variables and reference them in an Angularjs Protractor config file. I defined the variables in /etc/environment. This is what I've tried so far:

params: {
  login: {
    user: $E2E_USER,
    pass: $E2E_PASS
  }
}

I also tried this:

params: {
  login: {
    user: process.env.E2E_USER,
    pass: process.env.E2E_PASS
  }
}

Any help would be much appreciated!

like image 860
Brendan Avatar asked Apr 22 '14 16:04

Brendan


1 Answers

I used export E2E_USER=username and that worked.

like image 177
Brendan Avatar answered Oct 28 '22 01:10

Brendan