Clicking on svg using selenium python

后端 未结 2 1832
执念已碎
执念已碎 2020-11-30 13:20

svg icon is clickable.

2条回答
  •  时光说笑
    2020-11-30 13:56

    The "svg" elements are not from the XHTML namespace but belongs to SVG namespace. Hence you have to specify name()="svg" while constructing the xpath for svg tags. for example : "/*[name()='svg']/*[name()='path'] "

    For your reference , please find below discussion How to click on SVG elements using XPath and Selenium WebDriver through Java

提交回复
热议问题