Is there a way to auto confirm popup. For example i'm deletin开发者_StackOverflowg file via firefox this operation triggers a confirmation popup when the options are ok and cancel.
In this case i need to click on ok button automatically.
Found a way to do this in C#:
Perform the desired action (like delete) and then:
SendKeys.SendWait("{ENTER}"); //in case if the focus was on ok button
SendKeys.SendWait("{TAB}"); //in case if the focus was on cancel button
SendKeys.SendWait("{ENTER}");
精彩评论