java - Button is not Clickable or not getting any response -
html code button submit in jsp:
<button type="button" class="btninactive" name="save" id="savegrid" onclick="savelist()"> <img src="<c:url value="/images/save.png" />" alt="save" title="save" class="vmiddle padright5"> <spring:message code="label.save"/></button>
html code mouseover button:
<button onclick="savelist()" id="savegrid" name="save" class="btninactive" type="button" disabled="disabled"> <img class="vmiddle padright5" title="save" alt="save" src="/web/images/save.png"> save </button>
i tried this:
driver.findelement(by.xpath(".//*[@id='savegrid']/img")).click(); webdriverwait wait = new webdriverwait(driver, 15); wait.until(expectedconditions.elementtobeclickable(by.cssselector("button#savegrid"))); driver.findelement(by.cssselector("button#savegrid")).click();
it may because there might 1 more button same property , try find element uniquely try. ex: 2 button having same attributes @ time webdriver fail user in case of multiple element having same property try find element uniquely relative xpath
Comments
Post a Comment