title: I need to get an image src from the Xpath
body: <p><a href="https://i.stack.imgur.com/3xGui.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3xGui.png" alt="enter image description here"></a></p>
  
  <p>I'm using Python to get some elements from a web page,
  I need to get the SRC path from an Image tag using its Xpath code.</p>
  
  <p>The Xpath I'm trying to get data from is the following: </p>
  
  <pre><code>//*[@id="product_24793"]/a/figure/img
  </code></pre>
  
  <p>I've already tried using these two formats for the Xpath </p>
  
  <pre><code>//*[@id="product_24793"]/a/figure/img/@src
  
  //*[@id="product_24793"]/@src
  </code></pre>
  
  <p>Also the code that I have already tried is the following :</p>
  
  <pre><code>
  imgsrc = driver.find_elements_by_xpath('//*[@id="product_24793"]/a/figure/img')
  
  for ele in imgsrc:
      print(ele.text)
  
  path = ele.text
  </code></pre>
  
  <p>I'd like to have the src path as a result</p>
  
  <p>Thanks.</p>