Css selector for elements with style attribute

前端 未结 3 434
长情又很酷
长情又很酷 2021-01-03 10:39

I have an element with the following styles

Now I want to se

3条回答
  •  一向
    一向 (楼主)
    2021-01-03 11:20

    I think you only have to remove the first space:

    ul[style="background-color: transparent;"]
    

    Now it is searching all ul-tags which have this style; with the space between it tries to select all dom elements in(!) a ul-tag which have this sytle.

    Here an example with the querySelector for javascript, it should work with selenium too.

提交回复
热议问题