2

I have a page in which i have a link button.When i click on the link button a popup will appear,but the same if i do through "watin" , the popup is blocked and is showing the message "popup is blocked.Press "Ctrl" key to to allow the popup" is coming.

Through watin automation i am not able to get the pop up on click of a link button but if i click manually the popup is coming.I am sick and tired of searching for solution :( could anyone please help me.

Code is given below

Link link = myIE.Span(Find.ByText("hello"));
link.Click(); //here the popup is not coming

Thanks, Keshav

  • I see your problem, info on the internet is this is pretty sparse other than to complain about all the problems Watin has with pop-ups. – Xiaofu May 27 '09 at 10:36

2 Answers2

2

Presumably you have disabled the built-in IE pop-up blocker, which is why it's working manually...

Do you have any other IE toolbars installed, such as Google, Yahoo or MSN? Toolbars and other mystery pop-up blockers have been known to do this with Watin.

Xiaofu
  • 15,523
  • 2
  • 32
  • 45
0

You can use .NET to change the registry keys for IE.

Enable or disable all browser extensions:

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main]

Set value of [Enable Browser Extensions] to "Yes" or "No"

Here is a code example of writing the registry keys through .NET to get a site into a trusted zone, which allowed WatiN to be able to download a file:

Programmatically add trusted sites to Internet Explorer

Community
  • 1
  • 1
Even Mien
  • 44,393
  • 43
  • 115
  • 119