I am trying to print messages in Selenium when a step is failing. I am not sure which method should I use. My script is in Java and all it does is to open a website and click some stuff. The error messages are not helpful and I want to be able to translate these unhelpful messages to some customized ones by myself.
Which method or code should be used for that?