How do you test your web UI to see if it renders uniformly across different browsers?

Go To


Tools like Selenium are good for testing user interactions on the web UI. However, I was curious what are people approaches for strictly testing and verifying that web pages are rendered correctly across a set of browsers?

Is this even possible?

2008-09-19 06:32
by jon


May I recommend browsershots where you can submit pages and have them rendered out in a variety of browsers with various things set on or off such as Flash and JavaScript. At the end of the day you will still want to install FF, IE6-8, Opera and Safari/Chrome for testing manually. Also, if you've got a friend with a Mac (or a PC if you're using a Mac) get them to test in Safari too as I've personally found differences in the way both of them render the same page.

I'd also recommend that you develop mainly in Firefox and regularly check it in IE6 as you work. IE6 is the one that will mostly screw up so if it's working in both it's more likely to be working in all.

When you find rendering weirdness try and fix it in your markup and CSS first before resorting to CSS hacks as they can lead to 'interesting' problems later or in other browsers.

2008-09-19 06:38
by Evil Andy
I've made the experience that browsershots fails to accurately emulate the behaviour of my pages in certain browsers. The results of manual testing were different - markus 2008-09-19 06:42


There is only a handful of browsers you need to test, as some share a common rendering engine (Gecko or Webkit). Without explaining which or why, here's the current wisdom (2009):

  1. Build your site using Firefox or Opera (on any platform). BTW Opera uses its own Presto engine;
  2. Test in whichever of the above you didn't use.
  3. Validate the (X)HTML and CSS (important!).
  4. Test it in >=IE7 and note the glitches, if any.
  5. Use conditional comments in separate stylesheets for each version IE - never use CSS hacks as they'll go out of date.
  6. Test in IE <7 if you like and do the same, or use conditional comments to ask users (politely) to upgrade their version of IE.
  7. Test in Safari (Webkit).
  8. Don't test in Chrome, you already have by proxy (Webkit)!
  9. Don't test in IE for Mac - the share is too low and it's no longer updated.

Finally, try enlarging the text in Firefox, Opera, IE and Safari. Opera also has a hand-held emulation mode for mobiles.

You will have now covered (theatrical guess) 99.9% of browser setups. If you're on OS X or Linux, you can run Windows in a virtual environment like Parallels or Wine. Apparently Wine also has a Windows binary, but I couldn't find it. Caution: you'll need to be sure that your virtual environment allows IE to read conditonal comments.

In practice, I find that if a site has valid code and works in Firefox, Safari and Opera, it'll probably be okay in IE7 up. The only HTML/CSS gotcha is IE's 'haslayout' handling. If you don't have the browsers, BrowserStack is an excellent online testing service.

Finally, if you're using Javascript, you'll need to go through a similar process, problem being that as a rapidly developing area, newer versions of some browsers handle Javascript in increasingly effective ways, so functions in older versions might break or fail quietly.

2009-06-16 10:08
by Dave Everitt



I do not see an alternative if you want strict testing. Just install as many different browsers as possible and test in all of them. Of course this includes different versions of most popular browsers, and you need to check on Windows, Linux and Macintosh.

2008-09-19 06:36
by Shinhan


If you just want to see if layout is correct, just submit your website to and visit later to see the screenshots.

If you want to test the functionality (JavaScript, etc.) then you'll need to test manually.

2008-09-19 06:40
by Milan Babuškov


Previously I was use WM for different versions of IE, but I find out some new tool for testing layout, and UI as well with this tool, link for FF use fire bug extension, those tools are for manually testing.

2008-09-20 12:11
by vaske