Before starting this topic I would like to clear in beginning that Visual Studio 2013 uses Selenium WebDriver component to achieve cross browser testing as of now.
So to integrate WebDriver component with Visual Studio follow below given steps-
Start the Visual Studio and go to Tools menu and click on Extensions and Updates…
System will open Extensions and Updates window. Make sure you are in Online section. Search the ‘Selenium Component’ and download the same.
It will download the .msi file.
Install it on running machine.
Once you installed it, it keeps all the dll and files in below location-
C:\Program Files (x86)\Common Files\microsoft shared\VSTT\Cross Browser Selenium Components
Now restart the system and write below method-
CurrentBrowser property is a place where you define your browser type. Now run it and see the magic.