« Return to Thread: Execute the same test case on different browsers?

Execute the same test case on different browsers?

by ArneBanan :: Rate this Message:

Reply to Author | View in Thread

I use Selenium to record test cases. Convert to C# and use Visual Studio to compile the code and Nunit to execut the test cases.

My issue is that I want to be able to use one be able to call several different browsers from the same test case. If I call several browsers from the [Setup] e.g.

[SetUp]
        public void SetupTest()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*googlechrome, *iexplore, *safari", "http://google.com/");
            selenium.Start();
            verificationErrors = new StringBuilder();
            selenium.WindowMaximize();
        }

This will open Chrome, IE and Safari, but the test case will only be executed on Safari (since last opened). The solution now is that I use the same (copy of the code) code for the different browsers. It work but there will be a lot of places in the code to change if something has to be done in another way.

My question is: Is it possible to use the same test case (code) in order to call several different browsers and run the test on all of them?

Br

//Arne Banan

 « Return to Thread: Execute the same test case on different browsers?