title: Get path in svg using Selenium (Python)
body: <p>I have the following code which find all g's in svg, yet how could I get those path elements inside g's and their path value?</p>
  
  <p>I am testing with this website: <a href="http://www.totalcorner.com/match/live_stats/57565755" rel="nofollow">http://www.totalcorner.com/match/live_stats/57565755</a></p>
  
  <p>related code:</p>
  
  <pre><code>nodes = self.driver.find_elements_by_xpath("//div[@id='all_container']/*[@id='highcharts-0']/*[name()='svg']/*[name()='g']")
  </code></pre>
  
  <p>I have already tried this:</p>
  
  <pre><code>nodes = self.driver.find_elements_by_xpath("//div[@id='all_container']/*[@id='highcharts-0']/*[name()='svg']/*[name()='g']/*[name()='path']")
  </code></pre>
  
  <p>yet what I get is something like this:</p>
  
  <pre><code>[&lt;selenium.webdriver.remote.webelement.WebElement (session="fb86fb35-d2fa-974a-af32-a15db1b7459d", element="{c1dad34f-764d-0249-9302-215dd9ae9cd8}")&gt;, &lt;selenium.webdriver.remote.webelement.WebElement (session="fb86fb35-d2fa-974a-af32-a15db1b7459d", element="{a53816f4-9952-ab49-87ac-5d79538a855d}")&gt;, ...]
  </code></pre>
  
  <p>How could I use this to find the path value?
  thanks a lot</p>
  
  <p>My updated solution:</p>
  
  <p>thanks everyone's effort. After Robert Longson's updated answer, I think the following is the better solution:</p>
  
  <pre><code>nodes = driver.find_elements_by_xpath("//div[@id='all_container']/*[@id='highcharts-0']/*[name()='svg']/*[name()='g']/*[name()='path']")
  for node in nodes:
      print(node.get_attribute("d"))
  </code></pre>
  
  <p>Since I cannot differentiate paths if using driver.find_elements_by_tag_name, I think the answer above is better.</p>