My protractor conf.js,onPrepare
function needs to make a http request that looks like,
onPrepare: function(done) {
request.get('http://pepper/sysid')
.end(function(err, resp){
if(err || !resp.ok){
log("there is an error " + err.message)
done()
}else{
global.sysid = resp.sysid
done()
}
})
It throws error as,done is not a function
Is there any other way, that i can force the callback inside onPrepare
to be invoked before my tests start execution?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…