title: I want to find the xpath for the image
body: <p>This is the html code</p>
  
  <pre><code>&lt;div class="navBg"&gt;
  &lt;table id="topnav" class="navTable" cellspacing="0" cellpadding="0" style="-moz-user-        select: none; cursor: default;"&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td class="logoCell" valign="top"&gt;
  &lt;td class="separator"&gt;
  &lt;td class="navItem relative" style="z-index: 99"&gt;
  &lt;td class="separator"&gt;
  &lt;td class="navItem relative"&gt;
  &lt;a class="content tasks" style="border-width: 0" href="/tasks/otasklist.do"&gt;
  &lt;div class="label" style="z-index:155; "&gt;Tasks&lt;/div&gt;
  &lt;img class="sizer" width="84" height="93" src="/img/default/pixel.gif? hash=1106906246"/&gt;
  &lt;span class="bottomBorder"&gt;
  </code></pre>
  
  <p>I am trying to find the xpath for the image--></p>
  
  <pre><code>src="/img/default/pixel.gif?hash=1106906246"
  </code></pre>
  
  <p>I have tried different combinations e:g</p>
  
  <pre><code>//table/tbody/tr/td[5][@class='navItem relative']/a/div[2]/img
  </code></pre>
  
  <p>I have written the following code too.</p>
  
  <pre><code> WebDriverWait wait= new WebDriverWait(driver, 20);
      wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Tasks")));
  
      driver.findElement(By.xpath("//table/tbody/tr/td[5][@class='navItem relative']/a/div[2]/img")).click();
      driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
  </code></pre>
  
  <p>It's identifying the element on web page by firepath but after running the script it's not clicking on the element and the console shows "No Such Element Exception".</p>
  
  <p>Please answer in java lang only.
  Can somebody please help me out.???</p>
  
  <p>Thx</p>