As per webdriver this issue is fixed in 2.16 but still it does not work
Support for window.ShowmodalDialog
You can use Java Robot class for handling such cases.
Example :
Wait(5000); // Wait for model pop,
int keyInput[] =
{
KeyEvent.VK_S, KeyEvent.VK_E, KeyEvent.VK_L, KeyEvent.VK_E,
KeyEvent.VK_N, KeyEvent.VK_I, KeyEvent.VK_U, KeyEvent.VK_M,
};
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_TAB);
robot.keyPress(KeyEvent.VK_TAB);
for (int i = 0; i < keyInput.length; i++)
{
robot.keyPress(keyInput[i]);
robot.delay(100);
}
robot.delay(1000);
robot.keyPress(KeyEvent.VK_TAB);
robot.delay(1000);
robot.keyPress(KeyEvent.VK_TAB);
robot.delay(1000);
robot.keyPress(KeyEvent.VK_TAB);
robot.delay(1000);
robot.keyPress(KeyEvent.VK_ENTER); // Save Btn
The delay between events is necessary otherwise you will miss the events.