Compound class names not permitted error Webdriver

后端 未结 6 699
迷失自我
迷失自我 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 08:25

    The issue is because of the way find by Class name works.

    in your code class name is class="alert alert-success"

    If the class name has space you'll get the above error. You can simply get rid of the issue by using Id, CSS, Xpath, regular expression or any other element finder method.

    Do you need to use Class Name or can you use another method? Let me know if you need to use class name.

提交回复
热议问题