The below lines of code has been written by one of my colleague. This code is working for me, but I am actually looking for an explanation for each line. specially It is confusing with callback. It will be great if anyone can comment each line.
Thanks
function startApp(done) {
console.log("Inside startApp");
browser.get(baseUrl).then(
function (success) {
console.log("LOG MESSAGE - URL launched successfully");
browser.waitForAngular();
done();
},
function (failure) {
console.log("LOG MESSAGE - Fail to launch URL");
done(failure);
}
);
}