ScreenCapture an AlertNotificationTextMessage

Hi Katalon team,

here is what I’m trying to do. I want to capture the Notification Message after a successful login. But the problem is, I can’t catch it since the loading was only less than a second after the “Successfully Login” message appears.

Here is the sample script:
image

I’m also trying to verify if the message appears thru the Store and Echo command.

Is there anyway I can capture the Alert Message before it loads to another page?

Here is what I get when I run the script:
image
It’s either it screen capture before or after it appears on the screen.

Thank you in advance.

Regards,

Reymund

No, I do not think Katalon has a force to let the Alert dialog to wait for your capturing.

You should talk to the developer of your Application Under Test to change the design of the page: modify the Alert dialog to have OK button and let it wait for your click action.

1 Like

Thanks for your reply.
Is VerifyElementPresent the correct command to verify the the Alert Message dialog? or do you know any other Verify Command that I can use?

Thanks

Why not you try it and see what happens?

I think it is good enough if you do verifyElementPresent for the message text “Successfully Login. Please wait…” in the Alert dialog. VerifyElementPresent does not affect the behaviour of the Alert dialog so that the dialog would not wait for your capturing.


I do not use Katalon Recorder, I use Katalon Studio.

In Katalon Studio, I can send any JavaScript into the web page and execute it by WebUI.executeJavaScript() keyword. With it, you have a chance to modify the behaviour of your target web application so that “the Alert dialog to wait for your capturing”. However, I would not recommend for a “Test” to modify the target, because it may cause unexpected side effects in the web app. I would say again, you should talk to the web developers to change the web app to be “test-friendly” if you desperately want to shoot the Alert capture.

1 Like

Thanks, i’m just new in using Verify commands.
VerifyElementPresent does work but I don’t know if it’s the right command for that. Thanks for clarifying.

I already told the Devs to adjust the delay for the Alert Message so we can capture it during testing.

Thank you for the suggestions. Have a great day!