How to connect proxy to Selenium Chrome with authorization?

Viewed 47

Please, see the screenshot:

enter image description here

When opening the selenium browser, it flashes this, how to automatically enter data at compile time?

 Proxy proxyClass = new Proxy();
        proxyClass.setHttpProxy(urlAndPort);
        proxyClass.setSslProxy(urlAndPort);
        proxyClass.setSocksUsername(login);
        proxyClass.setSocksPassword(password);

     ChromeOptions chromeOptions = new ChromeOptions();
     chromeOptions.setCapability("proxy", proxyClass);
     
 WebDriver driver = new ChromeDriver(chromeOptions);``
 driver.get("https://2ip.ru/"); 
0 Answers
Related