Is there a way to setup Selenium proxy in Serenity?
Hi Mark,
You can refer to the sample code below in setting up Selenium proxy:
/// <summary>
/// Performs the initialize of the browser.
/// </summary>
/// <param name="driverFolder">The driver folder.</param>
/// <param name="proxy">The proxy.</param>
/// <returns>
/// The web driver.
/// </returns>
protected override IWebDriver PerformInitialize(string driverFolder, Proxy proxy)
{
var options = new ChromeOptions();
if (!string.IsNullOrWhiteSpace(proxy.HttpProxy))
{
options.AddAdditionalCapability(CapabilityType.Proxy, proxy);
}
return new ChromeDriver(driverFolder, options);
}