Automation - Selenium - Catch a failure
Customer
Anz Bank
Use Case
Issue
Trying to capture an Exception/failure in a Synthetic scenario using Mvel won’t work (it is not supported):
CODE
try {
wait.until(ExpectedConditions.elementToBeClickable(By.partialLinkText("Find Customer")));
wait.until(ExpectedConditions.not(ExpectedConditions.presenceOfAllElementsLocatedBy(By.className("siebui-busy"))));
log.info("**************************************************try****************");
} (Exception ex){
log.info("**************************************************catch****************");
}
Solution
In more recent version of Germain, you can create these selenium scripts in Javascript (instead of Mvel):
Full script
Explanation