Skip to main content
Skip table of contents

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

synthetic_scenario_script.txt

Explanation

synthetic_scenario_script_guide.txt

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.