MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / fromString

Method fromString

java/src/org/openqa/selenium/Platform.java:478–493  ·  view source on GitHub ↗

Gets a platform with the name matching the parameter. @param name the platform name @return the Platform enum value matching the parameter

(String name)

Source from the content-addressed store, hash-verified

476 * @return the Platform enum value matching the parameter
477 */
478 public static Platform fromString(String name) {
479 for (Platform platform : values()) {
480 if (platform.toString().equalsIgnoreCase(name)) {
481 return platform;
482 }
483 }
484
485 for (Platform os : Platform.values()) {
486 for (String matcher : os.partOfOsName) {
487 if (name.equalsIgnoreCase(matcher)) {
488 return os;
489 }
490 }
491 }
492 throw new WebDriverException("Unrecognized platform: " + name);
493 }
494
495 /**
496 * Decides whether the previous match is better or not than the current match. If previous match

Callers 9

testWindowsIsWindowsMethod · 0.95
testWindowsIsNotEmptyMethod · 0.95
setCapabilityMethod · 0.95
resolvePlatformMethod · 0.95

Calls 2

valuesMethod · 0.80
toStringMethod · 0.65