angularjs - How to define same path in all machins in Ubuntu using javascript for protractor -


i want define same path in ubuntu in windows(user.dir) want soulution

currently using :

projectpath="/home/local/nexteducation/**anandgoudp**/workspace/nexterp 

which static, in place of anandgoudp want user name in meching have logged in.

using shell command whoami can logged in user name. execute shell command using node js, can use shelljs npm module.

example:

var shell = require('shelljs'); var projectpath="/home/local/nexteducation/{{username}}/workspace/nexterp"; var currentusername = shell.exec("whoami").stdout.replace("\n",""); projectpath= projectpath.replace("{{username}}",currentusername); 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -