Selenium Webdriver is not using proxy

74 Views Asked by At

I'm trying to let selenium use the company proxy server for downloading the webdriver. But that keeps on failing. I can use proxy for using downloads manually.

from selenium import webdriver

class seleniumOptions:
  def local_options(self):
      options = webdriver.ChromeOptions()
      options.add_argument('--no-sandbox')
      options.add_argument('--disable-web-security')
      options.add_argument('--disable-software-rasterizer')
      options.add_argument('--proxy-server="http=10.10.10.10:80"')
      options.add_argument('--ignore-certificate-errors')
      options.add_experimental_option("detach", True)
      return options

I have tried many differents ways in giving it the address of the proxy server. But none of them worked. Also using the experimental options failed.

options.add_experimental_option("proxy-server", "http=10.10.10.10:80")

Setup is

  • Robot Framework 7.0
  • Robotframework-seleniumlibrary 6.2.0
  • Selenium 4.18.2

The error message is: Exception managing chrome: error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json): error trying to connect: tcp connect error:

0

There are 0 best solutions below