How to handle IE specific browser confirm dialog using Watin Core?

288 Views Asked by At

I am using the below code for a basic search automation using Watin Core.

 IE ie = new IE();
 GoToNoWait("www.stackoverflow.com");
 ie.TextField(Find.ByName("q")).TypeText("Test");
 ie.Button(Find.ByClass("btn js-search-submit")).Click();

But IE brings a pop up with the below message:

When you send information to the Internet, it might be possible for others to see that information. Do you want to continue?

Tried handling this using ConfirmDialogHandler but no luck. Any experts, please advise.

1

There are 1 best solutions below

0
ProgrammerV5 On BEST ANSWER

It will be easier for you to set this registry setting to 0 so no warning is shown. You will get other messages from IE but this one in particular won't be an issue:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]"1601"=dword:00000000

(if you set it to 1 the message will be shown).