How to mark test case failed if validation not matched

Hi,
if (1 == 1) {

	println('Correct')

    WebUI.closeBrowser() 
	
} else {
   
	 	println('not correct')
	
	 	//mark fail   
   
	    WebUI.closeBrowser()
}

How can I mark the test case failed in else condition if it will not match

KeywordUtil.markFailed()

1 Like