
Hi @moondaddy
As you say you're using Edge Chromium, you can use edgeOptions.AddArgument("--user-agent=xxx")
and edgeOptions.AddArgument("--proxy-server=xxx")
to set the proxy and user agent.
Example code (please note to change the values to your owns):
static void Main(string[] args)
{
EdgeOptions edgeOptions = new EdgeOptions();
edgeOptions.UseChromium = true;
edgeOptions.BinaryLocation = @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe";
// Here we try to set Firefox user agent...
edgeOptions.AddArgument("--user-agent=mozilla/5.0 (windows nt 10.0; win64; x64; rv:78.0) gecko/20100101 firefox/78.0");
edgeOptions.AddArgument("--proxy-server=http://user:******@yourProxyServer.com:8080");
IWebDriver driver = new EdgeDriver(@"D:\your_webdriver_path", edgeOptions);
driver.Navigate().GoToUrl("http://www.yourwebsite.com");
}
Reference link:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Regards,
Yu Zhou