Please see the following element:
× User \'M
WebElement element = driver.findElement(By.className("div.success") element.getText();
shall help you get the text of the div