Search code examples
watin

with Watin how do you stop the browser from loading images?


Just trying to see if I can stop Watin / IE from loading images so the whole thing goes a lot faster?


Solution

  • You can stop images from being loaded via the Internet Explorer options.

    To disable images in IE:

    1. Select Tools -> Internet Options
    2. Go to the Advanced tab
    3. Scroll down to the settings section Multimedia
    4. Uncheck the box 'Show pictures'

    This could also be achieved programmatically by changing the appropriate registry setting. e.g.

    RegistryKey ieKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Internet Explorer\Main");
    ieKey.SetValue("Display Inline Images", "no");