I want to assert only when value present like below ?
var data = await driver.getData();
if(data) {
assert(data).to.equal('tool');
}
is it right approach to handle this here because sometime my data is coming null ? or any other way to handle it ?
Aucun commentaire:
Enregistrer un commentaire