OpenQA.Selenium.Speed.FromString C# (CSharp) Method

FromString() public static method

Creates a Speed object from its string description.
public static FromString ( string speedName ) : Speed
speedName string The description of the speed to create.
return Speed
        public static Speed FromString(string speedName)
        {
            Speed toReturn = Fast;
            if (string.Compare(speedName, "medium", StringComparison.OrdinalIgnoreCase) == 0)
            {
                toReturn = Medium;
            }

            if (string.Compare(speedName, "slow", StringComparison.OrdinalIgnoreCase) == 0)
            {
                toReturn = Slow;
            }

            return toReturn;
        }