Skip to main content

How to Run a Test on Multiple Browsers

Intro

You'll occasionally have something that you want to test across multiple browsers. It would be nice to run your test once and have it execute against all the browsers you care about. Unfortunately this functionality doesn't come out of the box with most testing frameworks.

A Solution

With the help of Sauce Labs, a collection, and a loop, we can easily specify a list of browsers and run a test against each of them.

Let's take a look at an example.

About The Author

Dave Haeffner is the original writer of Elemental Selenium -- a free, once weekly Selenium tip newsletter that's read by thousands of testing professionals. He also created and maintains the-internet (an open-source web app that's perfect for writing automated tests against).

Dave has helped numerous companies successfully implement automated acceptance testing; including The Motley Fool, ManTech International, Sittercity, and Animoto. He is also an active member of the Selenium project and has spoken at numerous conferences and meetups around the world about automated acceptance testing.

Dave Haeffner profile picture