Failure Handling


This is a companion discussion topic for the original entry at


Looking to understand how i might use the failure method in a try catch function? Specifically I would like to move to the next item in the link array upon hitting a 404 page instead of just letting my code fall off a cliff. Just not sure what I should be working around with the pre-build error handling methods.


if you want to catch error, you just have to use “FailureHandling.OPTIONAL” in your try instructions.

Example :

boolean browserAlreadyOpenedAtGoodUrl
String currentUrL
try {
	//	com.kms.katalon.core.webui.driver.DriverFactory.verifyWebDriverIsOpen()
	WebUI.switchToWindowUrl(GlobalVariable.url, FailureHandling.OPTIONAL)
	currentUrL= WebUI.getUrl()
	if (currentUrL.equals( GlobalVariable.url)) {
} catch (Exception e) {