private string ResolveDriverVersion(IDriverSetupStrategy setupStrategy, string version)
        {
            DriverVersionResolver driverVersionResolver = new DriverVersionResolver(
                BrowserName, BuildingContext, setupStrategy);

            if (version == DriverVersions.Auto)
            {
                return(driverVersionResolver.ResolveCorrespondingOrLatestVersion());
            }
            else if (version == DriverVersions.Latest)
            {
                return(driverVersionResolver.ResolveLatestVersion());
            }
            else if (DriverVersions.TryExtractBrowserVersion(version, out string browserVersion))
            {
                return(driverVersionResolver.ResolveByBrowserVersion(browserVersion));
            }
            else
            {
                return(version);
            }
        }
 /// <summary>
 /// Sets the browser version.
 /// It will find driver version corresponding to the browser version.
 /// </summary>
 /// <param name="version">The version string.</param>
 /// <returns>The same builder instance.</returns>
 public DriverSetupConfigurationBuilder ByBrowserVersion(string version) =>
 WithVersion(DriverVersions.CreateCorrespondingToBrowser(version));