Skip to content

Commit

Permalink
[dotnet] have support proxies for Selenium Manager (#12100)
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed May 27, 2023
1 parent 5b40670 commit 679fdb8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dotnet/src/webdriver/SeleniumManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ public static string DriverPath(DriverOptions options)
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --browser-path \"{0}\"", browserBinary);
}

if (options.Proxy != null)
{
if (options.Proxy.SslProxy != null) {
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --proxy \"{0}\"", options.Proxy.SslProxy);
} else if (options.Proxy.HttpProxy != null) {
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --proxy \"{0}\"", options.Proxy.HttpProxy);
}
}

return RunCommand(binaryFullPath, argsBuilder.ToString());
}

Expand Down

0 comments on commit 679fdb8

Please sign in to comment.