Presionar la tecla ESC a través de la clase robort para cerrar la ventana emergente no funciona en Chrome 31 y Firefox 26
Frecuentes
Visto 141 veces
0
I work on selenium automation, we recently updated our selenium jars to latest selenium version and also updated firefox and chrome to latest,
we have one usecase where on clicking on the ESC key we can close the pop-up. But the key pressing doesn't works in both the browser.
1 Respuestas
0
are u sure clicking ESC button Manually closes POPUP????
if robot class fails try this
driver.findElement(By.name("LOCATOR")).sendKeys(Keys.ESC);
Robot class is far better than using SendKeys
(OR)
if it is an alert box try this code you can handle POPUP by using this
try{
Alert alert = driver.switchTo().alert();
alert.accept();
}
catch(NoAlertPresentException e)
{
/****/
}
Espero que te ayude
-Ajay
respondido 27 nov., 13:12
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas google-chrome firefox selenium automation key or haz tu propia pregunta.