mercredi 12 avril 2017

window.showModalDialog not appear when running with selenium

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 gecko driver and I also test my application with chromeDriver and ieDriver with no success

Aucun commentaire:

Enregistrer un commentaire