As a web developer, for performing cross browser testing, we need to run our web site in multiple browsers from Visual Studio.
Generally, in a common way, we select a particular browser from the browser
selection menu and run the application. However, you can set multiple
browsers as your default browser.
Using the Code
When you run the application without debugging (Ctrl+ F5), Visual Studio will run the application in all the browsers, in case of debugging (F5), Visual Studio will prompt you to select a particular browser from the selected default browser list.
In the browser list drop-down, by default, you will be able to see the list of all added browsers, with default browser as checked.
When you select the “Browse With…” option, the following dialog will appear,
and you can see the entire list of browsers along with the browser which is
marked as “(Default)”.
Now, there can be more than one default browser, and the same has been written in the dialog control as well – “Browsers (Select one or more):”. So, select all the browsers in which you want to run the application
together, and click on “Set as Default”. That’s all. Now if you click
on “Browse” button in the same dialog control, you will find your web
application starts on all the selected browsers at the same time.
If you go back to the Visual Studio main menu, a new option “Multiple Browser” will appear.
Now, if you want to debug the application, and press “F5”
or select the multiple browsers options, the following dialog will appear,
and you need to select a specific browser from the list of selected
If you run the application without debugging mode and wanted to run the application to verify the cross browser compatibility, Visual Studio will invoke all the browsers for the same application.
Points of Interest
This feature is really useful for web developers who spend time
on cross browser testing! And of course – all the web developers
spend time for the same! So, from next time, apply this feature. ;)
Note: This is not a new feature with Visual Studio 2013, it was available in previous versions as well.
8th February, 2014: Initial version