views:

160

answers:

2

Hi

I want WatiN to disable JavaScript for some of my tests but can't find any obvious way to do it.

Is it possible?

I am using IE specifically.

Thanks in advance, Ciaran

A: 

You can enable or disable Javascript on different browsers, please check the below link http://mistered.us/tips/javascript/firefox.shtml

You just select the browser type you are using and it will show you the steps.

Enjoy debugging

Ravia
RaviaThanks for this. I needed to do it programatically, however, so I needed to set the following Registry KeySoftware\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\2\SubKey 1400, 3 ( to disable )1400, 0 ( to enable )
Ciaran
I believe ActiveX can do the magic for you.Try below vbscript:Set WshShell = WScript.CreateObject("WScript.Shell")'Adjust to fit your reg pathWshShell. RegWrite"HKCU\Software\ACME\FortuneTeller\MindReader","Goocher!", "REG_SZ"
Ravia
A: 

This isn't possible because, I think, WatiN injects some javascript in the webpage. There was a bug in Windows 7 because of that.

Jochen