const arr= ['A', 'B']
module.exports = {
'testCase1'(browser){
console.log("Hello") //Doesn't print to the console
},
'testCase2'(browser){
arr.forEach(myFunction);
function myFunction(value){
browser
.useXpath().click(`//span[text() = "${value}"]`)
//rest of the code
}
}
}
I am using Nightwatch for automation.
Que 1- In testCase 1, why Hello is not printed to the console when I write in the test case?
Que 2- In testcase2, It does nothing, what can be the reason?