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
ieDriver with no success.