none
Change Google Chrome Proxy Setting Using .Net

    Pertanyaan

  • Hi All,

    I referred reasonable amount of web sites regarding my issue. but still non of the website help me to resolve my issue. according most of website has posted the following code sample. I am using C# with Selenium. Can anyone help to fix this.

    ChromeOptions options = new ChromeOptions();
     
    string proxyUrl = String.Format("http://{0}:{1}@{2}:{3}", "simulation1", "4lN8eLjx1g", "186.227.194.46", "80");
     
    Proxy proxyObj = new Proxy()
    {
        IsAutoDetect = false,
        Kind = ProxyKind.Manual,
        HttpProxy = proxyUrl,
        SslProxy = proxyUrl
    };
     
    options.Proxy = proxyObj;
    options.AddArgument("--proxy-server=" + proxyUrl);
    options.AddArgument("ignore-certificate-errors");
     
    IWebDriver driver = new ChromeDriver(options);
    driver.Navigate().GoToUrl("https://whatismyipaddress.com/");
     
    driver.Close();
    driver.Quit();


    Gehan Fernando Snr. Engineer Technology. AKLO Information Technologies (Pvt) Ltd. #58, 42nd Lane, 5th Floor, Wellawatta, Colombo 06, Sri Lanka. Phone: +94 117 520000 | Mobile: +94 772 269625

    04 Mei 2018 13:00

Semua Balasan

  • Hello,

    According to your question is more related to third party libraries, You could ask from Selenium forum for better support. If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

    Best Regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    07 Mei 2018 8:20