Compound class names not permitted error Webdriver

You can access the element if it has multiple classes using “By”:

from selenium.webdriver.common.by import By
driver.findElement(By.cssSelector(".alert.alert-success"));

Leave a Comment