* Checks that the given success message exists in the message panel
* @param page the page
* @param expectedMessage the text of the expected message
*/
public static void testMessageExists(HtmlPage page, String expectedMessage) {
HtmlDivision messagesDiv = page.getHtmlElementById("messages");
List<HtmlElement> messages = messagesDiv.getElementsByAttribute("ul", "class", "messages");
assertFalse("No message found", messages.isEmpty());
boolean found = errorOrMessageExists(messages, expectedMessage);
assertTrue("This message wasn't found", found);
}