mardi 25 février 2020

In WebDriverJS is it right way to assert only when value exists?

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