2009-01-19 8 views

Antwort

13

siehe auch Trev's Blog und here.

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

Meine Entschuldigung- Ich habe dies nicht genug sorgfältig das erste Mal gelesen und dachte nicht, dass es meine Frage beantwortet, aber es tat! Vielen Dank! – Leslie

+0

NP - glücklich zu helfen! – Dror