2009-01-19 12 views

Respuesta

13

ver Trev's Blog y here también.

using(IE ie = new IE("http://hostname/pagename.htm")) 
{ 
    AlertDialogHandler alertDialogHandler = new AlertDialogHandler(); 
    using (new UseDialogOnce(ie.DialogWatcher, alertDialogHandler)) 
    { 
     /************************************* 
     * -- alert -- * 
     * * 
     * must use the "NoWait" to allow * 
     * the code to goto the next line * 
     * * 
     *************************************/ 

     alertDialogHandler.WaitUntilExists(); 
     alertDialogHandler.OKButton.Click(); 
     ie.WaitForComplete(); 
    } 
} 
+1

Mis disculpas: No lo leí con cuidado la primera vez y no creo que haya respondido mi pregunta, ¡pero lo hizo! ¡Gracias! – Leslie

+0

NP - ¡feliz de ayudar! – Dror

Cuestiones relacionadas