Global variable in nightwatch. Issue in for loop for node.js
问题 I am currently working with node + nightwatch + selenium for automation. I came across a scenario: I have defined an array as Global array in nightwatch: Dev.js 'checkforLink':{ link1:"Some Xpath 1", link1:"Some Xpath 2", link1:"Some Xpath 3", link1:"Some Xpath 4" }, In my custom js script in custom-commands, I am doing a for loop to fetch this links from global variable: exports.command = function(callback) { browser = this; var data = browser.globals; console.log("Before all loop"); for(var