I am getting the following error:
\"Compound class names not permitted\"
While trying to access web element where-in the elemen
You can use
driver.findElement(By.className("alert-success"));
or
driver.findElement(By.className("alert"));
As right now selenium doesn't support multiple class name.If your class name includes a space, WebDriver will see it as a "compound selector". You can use cssSelector or id for selecting the webelement.