if (BrowserType.firefox.name().equals(driverName)) {
driver = new FirefoxDriver();
} else if (BrowserType.ie.name().equals(driverName)) {
driver = new InternetExplorerDriver();
} else if (BrowserType.chrome.name().equals(driverName)) {
driver = new ChromeDriver();
} else if (driverName.startsWith(BrowserType.remote.name())) {
String[] params = driverName.split(":");
Assert.isTrue(params.length == 4,
"Remote driver is not right, accept format is \"remote:localhost:4444:firefox\", but the input is\""
+ driverName + "\"");