I know the ID of the image button but still can't click using :
driver.findElement(By.id("its Id")).click()
Can't provide website link as its not a public website but pasting the HTML for the specified webelement.
<div ondragstart="var e=window.event;e.cancelBubble=true;e.returnValue=false;return false;" draggable="false" id="WD0191" ct="B" lsdata="{4:'Add\x20All',10:true,12:'\x2fsap\x2fpublic\x2fbc\x2fur\x2fnw5\x2fthemes\x2f\x7ecache\x2d20171002133000\x2fBase\x2fbaseLib\x2fsap_belize\x2fsvg\x2flibs\x2fSAPGUI\x2dicons.svg\x23s_pagedo'}" lsevents="{Press:[{ResponseData:'delta',ClientAction:'submit'},{}]}" role="button" aria-labelledby="WD0191-arialabel" title="Add All " tabindex="0" ti="0" class="lsButton lsTbarBtnStd urInlineMetricTop urNoUserSelect urBtnRadius lsButton--onlyImage urBtnImgBgColor lsButton--design-standard urBtnStd">
<span id="WD0191-cnt" class="urNoUserSelect lsButton--content lsControl--centeraligned " style="pointer-events:none;">
<svg data-sap-ls-svg-inline="true" data-sap-ls-svg-inlinehtmlexchange="true" id="WD0191-img" alt="Add All " tabindex="-1" ti="-1" focusable="false" preserveAspectRatio="none" viewBox="0 0 100 100" class="urSvgAppIconMetric urSvgAppIconColorBase urSvgAppIconVAlign urImgBtn lsButton__image" style="nop:nop;margin-top: 0px;;nop:nop;">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#_SAPGUI-icons_1_s_pagedo"></use>
</svg>
<span class="lsButton--onlyImage-pusher" style="display:inline-block;width:0;"> </span>
</span>
<span id="WD0191-arialabel" style="display:none;visibility:hidden;">Add All</span>
</div>
Can any one suggest how I can click on it by any other way?
Update: When i try to click on it using click() it just kind of moves the mouse to that element. So yes i am sure it identifies the item correctly. But somehow clicking it using webdriver doesn't gives the same result as it would if clicked manually.
I think because the javascript written for this element is not getting triggered when i click it using webdriver thats why i don't get desired result.
I have tried using:
new Actions(driver).moveToElement(input).click().perform();
But no results.
Update: what the button is used for and in bigger picture inside which div tag it is. This button is inside a table which is divided in two parts in first part of the table you fetch results based on some search criteria and if they are relevant you copy them to the second part of the table using this image button.