@@ -0,0 +1,2548 @@
+package com.autonomy.abc.selenium.config;%0A%0Aimport org.openqa.selenium.Platform;%0Aimport org.openqa.selenium.WebDriver;%0Aimport org.openqa.selenium.chrome.ChromeOptions;%0Aimport org.openqa.selenium.logging.LogType;%0Aimport org.openqa.selenium.logging.LoggingPreferences;%0Aimport org.openqa.selenium.remote.CapabilityType;%0Aimport org.openqa.selenium.remote.DesiredCapabilities;%0Aimport org.openqa.selenium.remote.RemoteWebDriver;%0A%0Aimport java.net.URL;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport java.util.logging.Level;%0A%0Apublic enum Browser %7B%0A    CHROME(%22chrome%22) %7B%0A        @Override%0A        DesiredCapabilities getCapabilities() %7B%0A            final DesiredCapabilities capabilities = DesiredCapabilities.chrome();%0A            final ChromeOptions options = new ChromeOptions();%0A            options.addArguments(%22--lang=en_GB%22);%0A            options.addArguments(%22--start-maximized%22);%0A            // avoids %22Disable developer mode extensions%22 popup%0A            options.addArguments(%22--disable-extensions%22);%0A            options.addArguments(%22--disable-popup-blocking%22);%0A            capabilities.setCapability(ChromeOptions.CAPABILITY, options);%0A            return capabilities;%0A        %7D%0A    %7D,%0A    FIREFOX(%22firefox%22) %7B%0A        @Override%0A        DesiredCapabilities getCapabilities() %7B%0A            return DesiredCapabilities.firefox();%0A        %7D%0A    %7D,%0A    IE(%22internet explorer%22) %7B%0A        @Override%0A        DesiredCapabilities getCapabilities() %7B%0A            return DesiredCapabilities.internetExplorer();%0A        %7D%0A    %7D;%0A%0A    private static Map%3CString, Browser%3E lookup = new HashMap%3C%3E();%0A    static %7B%0A        for (Browser browser : Browser.values()) %7B%0A            lookup.put(browser.name.toLowerCase(), browser);%0A        %7D%0A    %7D%0A%0A    private String name;%0A%0A    Browser(String name) %7B%0A        this.name = name;%0A    %7D%0A%0A    abstract DesiredCapabilities getCapabilities();%0A%0A    public WebDriver createWebDriver(URL url, Platform platform) %7B%0A        final DesiredCapabilities capabilities = getCapabilities();%0A        final LoggingPreferences logPrefs = new LoggingPreferences();%0A        logPrefs.enable(LogType.BROWSER, Level.ALL);%0A        capabilities.setBrowserName(this.toString());%0A        capabilities.setPlatform(platform);%0A        capabilities.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);%0A        return new RemoteWebDriver(url, capabilities);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return name;%0A    %7D%0A%0A    public static Browser fromString(String name) %7B%0A        return lookup.get(name.toLowerCase());%0A    %7D%0A%7D%0A

Move browser-specific setup from TestConfig into new Browser enum