I am using a Fiddler Core in which when I press "t" for Trust Root Certificate, it shows a DialogBox of "Security Warning" to press Yes or No.
I want to automate this section that when the dialog box opens my console application automatically clicks Yes.
If you want to click on button in another window - at first find title and class name of window. This can be done with Spy++, which is in start menu folder (Microsoft Visual Studio 2010/Visual Studio Tools/Spy++). In spy++ just press Search/find window..., than point to desirable window.
And now you can send key 'enter' to YOUR window (or first send 'tab', if [no] button is active)
Here's a link How to: Simulate Mouse and Keyboard Events in Code
example (works great with my firefox) :