title: Find an element with Python Selenium
body: <p>Somebody can help me to find a way to click on an img with Python Selenium?</p>
  <p>I need to find the div class=&quot;A&quot; which has a div class=&quot;B&quot; and then, click on his img in class=&quot;D&quot;</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="A"&gt;
      ...
  &lt;/div&gt;
  ...
  &lt;div class="A"&gt;
  
       &lt;div class="B"&gt;     &lt;!-- HERE IS WHAT I NEED TO CHECK--&gt;
          &lt;span class="E"&gt; &lt;!-- HERE IS WHAT I NEED TO CHECK--&gt;
          &lt;span class="F"&gt; &lt;!-- HERE IS WHAT I NEED TO CHECK--&gt;
       &lt;/div&gt;              &lt;!-- HERE IS WHAT I NEED TO CHECK--&gt;
       
       &lt;div class="C"&gt; &lt;/div&gt;
       
       &lt;div class="D"&gt;
          &lt;img class="Y" src="..."&gt; &lt;!-- HERE IS WHAT I NEED TO CLICK IF class="B" DOES EXIST (EVERY class="A" has an IMG in div class="D")--&gt;
       &lt;/div&gt;
       
  &lt;/div&gt;
  ...
  &lt;div class="A"&gt;
      ...
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I know I have to use XPath or CSS selector, but here it's not a rel/abs XPath... Please help me.</p>