In Java web application there's a line of code which opens a popup window whenever clicking on a link and this window has ok/cancle button:
return window.showModalDialog("popupWindow", obj, sFeatures);
I use below code in Selenium to click on the link:
geckoDriver.findElement(By.xpath(".//a[contains(@onclick, 'return openlink(8251')]")).click();
I'm sure the link is clicked successfully but the window.showModalDialog
does not open and I can not go on because of that.
What is the problem?
Note that I use GeckoDriver and I also test my application with chromeDriver
and ieDriver
with no success.
Html tag:
<td width="80" aria-describedby="grdOpeningTrustCartable_" title="openning" style="text-align:center;" role="gridcell">
<a class="gridHighlight" onclick="return openLink(8251,'04/12/17 15:50:00')" href="javascript:void(0);">openning</a>
</td>