Below is the html for SVG, pls help me with creating XPATH for same
<svg data-reactid=".1q.0.3.1.0" version="1.1" class="svg-connector">
<circle data-reactid=".1q.0.3.1.0.0" r="7" cy="11" cx="11" class="inner-circle"/>
</svg>
Below is the html for SVG, pls help me with creating XPATH for same
<svg data-reactid=".1q.0.3.1.0" version="1.1" class="svg-connector">
<circle data-reactid=".1q.0.3.1.0.0" r="7" cy="11" cx="11" class="inner-circle"/>
</svg>
For
svg
nodes you need to use below syntax:This is because common
HTML
nodes andsvg
nodes belongs to different namespacesTry the following
xpath
:The
<svg>
elements are not from the XHTML namespace but belongs to SVG namespace. Hence you have to specifyname()="svg"
while constructing thexpath
as follows :You can find a detailed discussion in Selenium WebDriver [Java]: How to Click on elements within an SVG using XPath