selenium-cucumber-js
selenium-cucumber-js copied to clipboard
Throwing exception
trafficstars
Is it possible to throw an exception on purpose to make the step failing?
Example:
return driver.wait(until.elementLocated(by.xpath("/html/body/div[13]/div/div[4]"))).getText().then(function (text){
console.log("Notify: " + text);
if(text !== "Updated successfully"){
throw exception
}
});