Tuesday, July 30, 2013

Registry entries for Internet Explorer settings

As a webdriver user you probably aware that IE browser requires few tweaks I mean specific settings in order to avoid hangs, indefinite waits etc.

There are few settings which are mandatory like enabling protected mode (Tools > Options > Security > Internet Zone > Checkbox at the bottom) should be ON or OFF for all Zones and there are few which are optional as long as your flow doesn't need those. For ex: Disable alert which shows 'Do you want to show http content over https?'

I have compiled comprehensive list of these settings that are required to make webdriver tests work fine in IE. You can apply these settings using registry file as a one time task on all of your client machines during initial setup or at runtime in your project.

To apply these on your machine, save highlighted code below as a .reg file and double click to merge changes into registry.

Please read comments for each to know more about settings.

REGEDIT4

;1406 - Disable Popup blocker
;1609 - Enable Dispaly Mixed Content(http over https)
;2500 - Turn On Protected Mode
;http://support.microsoft.com/kb/182569
;Local Intranet Zone
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1]
"1406"=dword:3
"1609"=dword:0
"2500"=dword:0

;Trusted sites Zone
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2]
"1406"=dword:3
"1609"=dword:0
"2500"=dword:0

;Internet Zone
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]
"1406"=dword:3
"1609"=dword:0
"2500"=dword:0

;Restricated Sites Zone
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4]
"1406"=dword:3
"1609"=dword:0
"2500"=dword:0

;Disable Check for Publisher's Certificate Revocation
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing]
"State"=dword:23e00

;Disable Check for Server Certificate Revocation
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"CertificateRevocation"=dword:0

;Disable Auto Form Fill and Remember Password
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Use FormSuggest"="no"
"FormSuggest Passwords"="no"
"FormSuggest PW Ask"="no"

;Disable dailog box 'A script on this page is causing Internet Explorer to run slowly. Do you want to stop the script?'
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles]
"MaxScriptStatements"=dword:FFFFFFFF

;Disable script error alerts in IE Containers
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"DisableScriptDebuggerIE"="yes"
"Disable Script Debugger"="no"
"Error Dlg Displayed On Every Error"="no"

;Disable Check for Default Browser as IE
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Check_Associations"="no"

2 comments:

  1. Hi Adivishnu,

    I have always seen that IE is very very slow and hence all my tests are failing, they works well for Chrome and Firefox,
    I have made sure that above settings are also in place and also tested on both 32 and 64 bit
    Any idea ?

    Thanks
    Chinmay

    ReplyDelete
    Replies
    1. Hi Chinmay,

      Sorry for the delay in response. I too had this issue but only on 64-bit machines. The workaround is to use 32-bit version IEDriverServer.exe instead of 64-bit version on 64-bit machine. This resolved the issue and execution speed is back to normal. Hope this helps.

      Regards,
      Vishnu

      Delete