I just discovered selenium – a great tool!
I plan to run/use selenium-ide generated junit4 code. But I need it to run with many browsers/web drivers.
Is there a junit/java-pattern for this use case? My first idea was to use @RunWith(Parameterized.class) and provide a List of WebDrivers (the parameter for the class – probably provided as an external file listing browsers and versions?!). Is this a good idea? Is it possible to provide a central @Parameters -method to be used by all my Selenium-tests?
What alternatives are there?
Probably it is possible to change the “Format” that Selenium exports to minimize manual changes?
Well, I do need to switch drivers from time to time, so I did this:
I initialize selenium related stuff in my own Class – called by name of the application and the driver is approached by the getters. When calling my class constructor, I use enum type of driver to initialize with:
of course my
Environmentclass looks like thisAnd my test class looks something like this