Compound class names not permitted error Webdriver

后端 未结 6 703
迷失自我
迷失自我 2020-11-28 07:31

I am getting the following error:

\"Compound class names not permitted\"

While trying to access web element where-in the elemen

6条回答
  •  我在风中等你
    2020-11-28 07:59

    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.

提交回复
热议问题