title: Selenium: How do I check the src attribute of an image?
body: <p>I'm trying to check the value of the <code>src</code> attribute for this image (highlighted in blue):</p>
  
  <p><a href="https://i.stack.imgur.com/J7NpW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J7NpW.png" alt="enter image description here"></a></p>
  
  <p>This is what I'm trying (not working):</p>
  
  <pre><code>visual = col_12_wrapper.find_element_by_class_name('visual')
  left_text_img = visual.find_element_by_css_selector('div.col-sm-6:first-of-type')
  left_img = left_text_img.find_element_by_tag_name('img')
  
  #this line below fails
  left_img[contains(@src,'../../static/images/databytes/colors/frame-0164.jpg')]
  </code></pre>