title: How to click on element in Selenium python?
body: <p>I'm new in Selenium and Python. I have the following code:</p>
  <pre><code>&lt;div class=&quot;Product_ImageWrapper__3W7pX&quot;&gt;
          &lt;span class=&quot; lazy-load-image-background opacity lazy-load-image-loaded&quot; style=&quot;color: 
           transparent; display: inline-block; height: 100%; width: 100%;&quot;&gt;
              &lt;img class=&quot;Product_Image__1sMZc&quot; src=&quot;xxx.jpg&quot; alt=&quot;photo&quot; height=&quot;100%&quot; 
               width=&quot;100%&quot;&gt;&lt;/span&gt;&lt;/div&gt; 
  </code></pre>
  <p>What I'm trying to do is click on this image. There is always message:</p>
  <blockquote>
  <p>Message: no such element: Unable to locate element:......</p>
  </blockquote>
  <p>I tried:</p>
  <pre><code>driver.find_element_by_xpath('//span[img/@src=&quot;xxx.jpg&quot;]').click()
  </code></pre>
  <p>or just by the name of the class but it doesn't work. Please help.</p>