How to handle the success messages in katalon?

Hi Team

Can anyone tell me how to handle the success messages once after the action in katalon?
Such as created an account and success message just display n go. How to test that in katalon?

Thank you
Creta

You need to look how the success message has implemented into your application. It may be in a alert form or something else. If it an alert then simply visual testing will justify this and for this you can simply utilize screen shot method. If you need to verify popup content then look into frontend code and try to capture the event which triggering this popup and it’s message.(it could be a JavaScript event).
In a simple way capture your popup test object and through test object properties you can verify . Let me know what works.

1 Like

Hello Creta ,
You can establish a structure similar to the code below for verification.

//Confirm the text is a Success message
elementPresent=WebUI.waitForAlert(20)
if (elementPresent==true) {
alertText = WebUI.getAlertText()
log.logWarning(‘The title of the alert is:=’ + alertText)
if (alertText==‘Successfully Created Contact’){
KeywordUtil.markPassed(‘SUCCESS: Successfully Created the Prospect’)
WebUI.acceptAlert()
} else {
WebUI.acceptAlert()
KeywordUtil.markFailed(‘ERROR: There was an error creating the Prospect’)
}
}

1 Like

i am also working on login page testing but i can not control error message like user name or password is incorrect. if you can help me so please help me.
i will be thanks full.
Error

Hello @nomiimam

WebUI.verifyTextPresent(‘username or password incorrect.’, false, FailureHandling.STOP_ON_FAILURE)

You can control this by using the keyword expression below. The keyword below verifies that the relevant warning message exists on the screen. As a result, this keyword will return True or False statements. This will help.
You can also use the VerifyTextNotPresent () keyword to prove that the corresponding expression does not exist on the screen.

1 Like