I tried to approve it on a normal browser (Chrome), but the empty content was detected, and the alert popped out as failed. But when I tried to use Katalon Spy and Record feature, I submitted an empty textarea like before, and it succeeded. When I check the database, this is the submitted data
three first is an empty textarea that has been submitted, while the last data is the normal browser data (I need to fill the textarea first because it will trigger the empty field alert like it expected to)
Is there any setting I should do on the Katalon so I can trigger the empty field alert?
If the app and editor is meant to show an alert when the content is empty, then you should create those conditions like a user would.
A few things you need to know
CKEditor is NOT a <textarea>. It is a <div> element with contenteditable="true".
Getting the content
Unlike a <textarea> where you can retrieve its content using its .value property, you can retrieve the content of a <div> element (including all the HTML) by using JavaScript to access the .innerHTML property of the element.