tags:

views:

612

answers:

3

Hi ,

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

+2  A: 

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
A: 

Thanks for the reply :) .Problem is resolved.I had installed google toolbar which was blocking the popup through Watin !!. Now i uninstalled it and hence its working :).

-Keshav

keshav
Glad to hear it. Can you mark the question as answered then please? :)
Xiaofu
A: 

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:

http://stackoverflow.com/questions/972345/programmatically-add-trusted-sites-to-internet-explorer

Even Mien