List of usage examples for org.openqa.selenium Platform extractFromSysProperty
public static Platform extractFromSysProperty(String osName)
From source file:org.openqa.grid.web.utils.BrowserNameUtils.java
License:Apache License
public static Map<String, Object> parseGrid2Environment(String environment) { Map<String, Object> ret = Maps.newHashMap(); String[] details = environment.split(" "); if (details.length == 1) { // simple browser string ret.put(RegistrationRequest.BROWSER, details[0]); } else {/*from w w w . j a v a2s . com*/ // more complex. Only case handled so far = X on Y // where X is the browser string, Y the OS ret.put(RegistrationRequest.BROWSER, details[0]); if (details.length == 3) { ret.put(RegistrationRequest.PLATFORM, Platform.extractFromSysProperty(details[2])); } } return ret; }