views:

645

answers:

3

I'm currently testing browser compatibility with IE7 for an app that I built initially for use with Firefox. The assumption at the time within our organization was that we could get everyone to use Firefox, but that's been called into question, so here I am. As a result, I have used many Firefox specific features and attributes that I need to check for and replace with equivalents. In order to do this I've found that I need to extensively debug the javascript to find the incompatible areas.

We use Windows exclusively here, so I don't need to test compatibility in other operating systems, at least not yet.

In order to immediately debug code changes, I need to run a test locally, but if I hit F5, it opens in Firefox until I go change the default browser.

Is there a way in Visual Studio to specify that a debug session should be opened in a certain browser, and a way to quickly change that, or otherwise, is there some batch or script that can be used to quickly change the default browser?

Also, any other tips for browser-compatibility testing?

+1  A: 

In the File menu you have two options:

View in browser (Ctrl+Shift+W) View with ... (which allows you to select the browser)

You can use the latter one to set your default browser when you're ready to switch to IE. It also lets you set browser dimensions.

Program.X
Cntrl-Shift-W didn't do anything for me. What version of VS has that?I also didn't see View With in the File Menu.I have Visual Studio Professional 2008
Tony Peterson
Me too. Make sure you're in a .ASPX page. I think it is contextual.
Program.X
I was in a JS page, that may have been the problem, I will try it again
Tony Peterson
View in Browser is there for an ASPX page but not the shortcut, and a lot of my important pages are dynamic and depend on session variables and such for their content, so I don't think that view in browser will work for me. But thanks for the suggestion.
Tony Peterson
+1  A: 

You can use Selenium to automate browser testing, and you can do that with both IE and Firefox (you create the tests using FF, then run in (almost) any browser)

That would be my approach.

DanSingerman
I just checked Selenium out, sounds like it will be useful
Tony Peterson