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

Method FromString

dotnet/src/webdriver/Platform.cs:187–198  ·  view source on GitHub ↗

Creates a object from a string name of the platform. The name of the platform to create. The Platform object represented by the string name.

(string platformName)

Source from the content-addressed store, hash-verified

185 /// <param name="platformName">The name of the platform to create.</param>
186 /// <returns>The Platform object represented by the string name.</returns>
187 internal static Platform FromString(string platformName)
188 {
189 if (Enum.TryParse(platformName, ignoreCase: true, out PlatformType platformTypeFromString))
190 {
191 return new Platform(platformTypeFromString);
192 }
193
194 // If the requested platform string is not a valid platform type,
195 // ignore it and use PlatformType.Any.
196
197 return new Platform(PlatformType.Any);
198 }
199}

Callers 3

GetCapabilityMethod · 0.80
DesiredCapabilitiesMethod · 0.80
GetCapabilityMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected