Verify validation text

Test plan is to verify if there any alert text appears, then close the operation.

I inserted value for Username and appearing “Already exists” below the text field. I want to track the text and close the test.

How to do?