Step 1 - Get Virtualbox
Is free and available on many platforms
Step 2 - Get a free Windows Virtual Machine
If you don’t have already a running Windows with IE you can quickly and legally go with this:
If, like me, you need to test against IE9, IE10, IE11 then you’ll need to download 3 VMs, one for each IE version, e.g.:
- IE9 - Win7
- IE10 - Win8 (preferred over Win7)
- IE11 - Win8.1 (preferred over Win7)
Step 3 - Install Java on the windows VM
Once you have your Windows VM up and running, you should ensure java is installed. Install link here:
You may need to retry this download a few times since Windows security scan gives troubles sometimes.
Step 4 - Disable protected mode on IE options among other things
Go to Internet explorer options, follow these screen shots to get all setup:
Following an IE10 / IE9 / IE8 necessary option:
Check “Install new versions automatically”
Step 5 - Download selenium standalone, latest
As of this writing, latest selenium is 2.41.0, search latest at:
Download these files in you windows VM:
We also need the IE driver, so by using 32 bits version and placing the extracted file into your windows path should get that ready. FYI people had issues with 64 bits versions of the driver so on x64 Windows machine I suggest you avoid using x64 driver even on a 64 bits machine.
If your are unsure where to put the extracted file, copy
Step 6 - Run IEDriverServer.exe manually
Windows protected mode might be enabled, so run manually the file
IEDriverServer.exe, but run it at the location path where you copied it, e.g.
Running that file will trigger the Windows security pop up so you can authorize the executable with Run anyway to get that remembered by Windows:
Then Allow access for it. This is more related to Windows firewall actually:
IMPORTANT Close running
IEDriverServer.exe now, this run was only to trigger Windows security and firewall dialogs.
Step 7 - Forward port 4411
We are going to use an arbitrary port number, let’s say 4411, for this IE11 VM.
One way to go is leave VirtualBox network configuration as it is, i.e. NAT then enable port forwarding so we can connect to that port as if it were at localhost.
In the host machine, go to
VirtualBox menu -> Devices -> Network -> Network Settings...
Add that Port Forwarding Rule in the screen shot above.
IMPORTANT You should check the IP address of your Windows machine also is
10.0.2.15 so VirtualBox forwards to the correct VM.
Another way is to change the network setup to be Bridged instead of NAT and you will have to find out the IP address it gets from your home network. That requires more work on your side paying attention to your IP addresses.
Step 8 - Write a .bat script to start selenium
Within your Window VM, you should place this
ie11.bat file in the same directory where you downloaded the selenium standalone jar, for example in your downloads folder.
1 2 3 4
Max instances can be increased but i prefer to have 1 running IE11 at the same time only.
Step 9 - Run ie11.bat
Note port 4411 is an arbitrary port we specified in the bat file. It needs to be open on that Windows VM, so open it in your Windows firewall or simply accept it when the Firewall screen appears after running
IMPORTANT Leave this script running on Windows machine. When you restart the VM you’ll have to manually start
ie11.bat again unless you add it to the startup program list.
Step 10 - Configure protractor to use IE11
This is simpler, just the the configuration properly. Weir thing below is the port number 4411 you can switch back to 4444 if you want to use
webdriver-manager start again, locally.
1 2 3 4 5 6 7 8
Final notes and extras
This isn’t the only way to run against IE machine, you could install nodejs there too and install protractor.
Also note, you can go a step further and setup a selenium standalone grid to replace
webdriver-manager entirely and to have more control.
Steps to do that below.
Alternative 1 - Install nodejs on Windows
Setting up protractor on Windows is quite doable, download first:
And select Windows Installer of course. I recommend you choose 32 bits installers. Follow setup wizard.
Once installed, open a Command Prompt or
Install protractor globally:
Make protractor download selenium and IE Driver for you:
Start selenium on a custom port, the one we preferred before: 4411
IMPORTANT Only specify
--seleniumPort=4411 within the Windows IE11 VM, not within your host machine, for example Linux.
When using IE10 you can use port
--seleniumPort=4410 and why not port 4409 por IE9 like this
But remember, on you Linux or Mac host machine, keep runing webdriver-manager without the port argument, so it uses default 4444 like this
Connect to that selenium started remotely to avoid having to run protractor binaries and nodejs infrastructure on that VM. In my case i run protractor from Linux or Mac OSX.
To to that, follow Step 10 in this post.
Alternative 2 - Use Selenium Grid2
Within the host machine, in my case Linux. Instead of running
webdriver-manager start you can switch to a standalone grid, a.k.a “hub” by running this simple command:
Note you can get selenium standalone jar file with wget:
Also, you may need to open that port 6666 on your firewall, i did it with
ufw in Ubuntu 13:
java -jar selenium-server-standalone command running in an open terminal, this is the selenium grid that nodes will connect to.
If you want to switch to a selenium grid, you will need to change
ie11.bat file like this:
1 2 3 4 5
Check the selenium grid logs, on your host machine (in my case Linux) to see if the output contains the following error or similar:
That’s the case when the firewall is blocking port 4411 on the guest VM.
If you can not work around it, considering moving your VM network setup from NAT to Bridged. Then you will have to find out the IP address of you host machine, in my case Linux, and replace
10.0.2.2 with that IP, e.g.
Networking setup details is are little beyond the scope of this post.
Hope this post helps you.
Have a good time writing e2e protractor tests ! :D