I have a date field and verifying the date is valid/invalid entered by the user. if the user enters invalid format like 10/14/201 and click on Save button, it throws a message by concatenating with the user entered date (i.e. 10/14/201 is not formatted. (mm/dd/yyyy)). Katalon will also captured the same.
Q: how to verify in the script if I give a different date?
please share ur suggestions.
I hope i understood your Q correctly. if yes then following.
Capture the error message to variable errmsg
Create another string by concatenating userentered date + “is not formatted. (mm/dd/yyyy))”
Compare the above two strings.
OR if you want to verify the format of user input then regular expressions.
you probably can use this
thanks and understood but the validation message is stored in an object with xpath and attributes right. so how to split from the xpath?
“How to split from xpath” I dont understand your question
use getattribute function or get text funcion in katalon.