During my testing, I met one "Send" link which will trigger js DialogPane to get your confirmation, such "OK" or "Cancel", onclick will execute JavaScript function like this for "OK" :
onclick="confirmSend()"
Here is a sample code how I simulate clicking "OK" within the js DialogPane:
driver.switchTo().activeElement();
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("confirmSend()");
Thanks for Shawn's Demo code, she gives me really great suggestion and inspiration!! :)