title: Unable to click and capture the correct xpath of an image using Selenium Webdriver
body: <p>I need to click on the that appears after clicking in box that opens after clicking on an expand icon. Using Webdriver I am able to expand the box but after that I am unable to click on the image icon which suposed to open a dialog box.</p>
  
  <p>The xpath is showing for that image is as follows:
  <code>html/body/div[2]/div/div/div/div[3]/div/div[2]/div/div[2]/div/div[2]/div/div/div/div/div/div/div/div[14]/div/div/div/div[1]/div/div[1]/div/div[2]/div/div/div/img</code></p>
  
  <p>The code is coming as:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="isc_X1" style="POSITION:relative;VISIBILITY:inherit;Z-INDEX:205382;CURSOR:default;" eventproxy="page$mainWindow$interactionsUI$$content$InteractionDetail$VerticalLayout1"&gt;
  &lt;div id="isc_X2" class="normal" onscroll="return page$mainWindow$interactionsUI$$content$InteractionDetail$customerInteractionSearchGrid.$lh()" style="position: absolute; left: 0px; top: 0px; width: 717px; height: 64px; z-index: 205400; margin: 0px; -moz-box-sizing: border-box; overflow: hidden;" eventproxy="page$mainWindow$interactionsUI$$content$InteractionDetail$customerInteractionSearchGrid"&gt;
  &lt;div id="isc_Y8" class="normal" onscroll="return page$mainWindow$interactionsUI$$content$InteractionDetail$MenuLayout.$lh()" style="position: absolute; left: 0px; top: 64px; width: 800px; height: 18px; z-index: 205454; padding: 0px; -moz-box-sizing: border-box; overflow: hidden; cursor: default;" eventproxy="page$mainWindow$interactionsUI$$content$InteractionDetail$MenuLayout"&gt;
  &lt;div id="isc_Y9" style="POSITION:relative;VISIBILITY:inherit;Z-INDEX:205454;CURSOR:default;" eventproxy="page$mainWindow$interactionsUI$$content$InteractionDetail$MenuLayout"&gt;
  &lt;div id="isc_YB" class="imgButton" onscroll="return page$mainWindow$interactionsUI$$content$InteractionDetail$ImageAdd.$lh()" style="position: absolute; left: 782px; top: 0px; width: 18px; height: 18px; z-index: 205472; -moz-box-sizing: border-box; overflow: hidden; cursor: pointer;" tabindex="7583" onblur="if(window.isc)isc.EH.blurFocusCanvas(page$mainWindow$interactionsUI$$content$InteractionDetail$ImageAdd,true);" onfocus="if(event.target!=this)return;isc.EH.focusInCanvas(page$mainWindow$interactionsUI$$content$InteractionDetail$ImageAdd,true);" role="button" eventproxy="page$mainWindow$interactionsUI$$content$InteractionDetail$ImageAdd"&gt;
  &lt;div id="isc_YA" style="POSITION:relative;VISIBILITY:inherit;Z-INDEX:205472;CURSOR:pointer;" eventproxy="page$mainWindow$interactionsUI$$content$InteractionDetail$ImageAdd"&gt;
  &lt;img border="0" align="TEXTTOP" height="18" width="18" suppress="TRUE" name="isc_YApage$mainWindow$interactionsUI$$content$InteractionDetail$ImageAdd" src="http://kolcaresuse01:12345/cwf/r/orga_pics/add_icon.gif?v=1371640285409en-xx"/&gt;
  </code></pre>
  
  <p>Please help to solve this.</p>