How to create data driven test using Nightwatch.js? I am using data.js file as global. The content is:
module.exports={
username:'xyz@gmail.com',
password:'12345',
urls: {
login: 'http://www.asdf.com'
}
};
How to create data driven test using Nightwatch.js? I am using data.js file as global. The content is:
module.exports={
username:'xyz@gmail.com',
password:'12345',
urls: {
login: 'http://www.asdf.com'
}
};
By giving the your file path value in key "globals_path" of your nightwatch.json file like below, you don't need to rename your js file , you can use data.js file as global file:
"globals_path" : "path/to/data.js",
and in your test file you can call variable like this :
browser.globals.username etc