October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Use a Proxy with Selenium 4

Set a proxy on Selenium 4 browser Options, understand which traffic it affects, and troubleshoot corporate proxy and authentication issues.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Selenium 4, configure a browser proxy on the browser’s Options object before creating the WebDriver session. In Python, attach a Selenium Proxy object to options.proxy; this routes browser traffic for that session. It does not automatically proxy Selenium Manager’s separate network requests for managing browsers and drivers.

Configure a proxy for a Selenium browser session

This Python example uses Chrome and a placeholder proxy endpoint. Replace the host and port, and select settings that match your proxy service and browser.

from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType

options = webdriver.ChromeOptions()
options.proxy = Proxy({
    "proxyType": ProxyType.MANUAL,
    "httpProxy": "proxy.example.test:8080",
})

driver = webdriver.Chrome(options=options)
try:
    driver.get("https://example.com/")
finally:
    driver.quit()

The endpoint above is illustrative, not a working proxy. Selenium’s Browser Options guide demonstrates the same pattern with a host-and-port value. Selenium 4 uses browser Options classes to supply session capabilities.

Choose the right proxy layer

Browser traffic

Use the browser Options object when page requests made by the browser need to pass through a proxy. Selenium describes proxy servers as intermediaries between a client and a server, and lists use cases such as capturing network traffic, mocking backend calls, and reaching sites across restrictive corporate networks. This is a situational network configuration, not a reason to route every automation task through a commercial proxy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Selenium Manager traffic

Selenium Manager’s own network requests—such as those involved in browser or driver management—have a separate proxy configuration. Its settings include --proxy, a proxy configuration value, and the SE_PROXY environment variable. Those settings do not configure the browser session. If browser or driver management fails before a session starts, see the Selenium Manager documentation and configure the network layer that is actually failing.

Proxy modes and available fields

The Selenium Python API exposes these proxy types: DIRECT, MANUAL, PAC, AUTODETECT, SYSTEM, and UNSPECIFIED. The API also exposes fields for HTTP and SSL proxy addresses, SOCKS address and credentials/version, a proxy auto-configuration URL, and bypass addresses (noProxy). Consult the Python Proxy API reference for the binding’s current names and details.

Rank #2

Those fields describe the Python API surface; they do not establish that every option behaves identically across browsers, bindings, drivers, or versions. For Chrome, ChromeDriver accepts standard WebDriver capabilities and Chrome-specific settings through ChromeOptions; Selenium’s example supplies the standard proxy capability through browser options. See ChromeDriver capabilities.

Authentication and corporate proxies

The basic example configures a manual endpoint without credentials. The cited Selenium references do not provide a universal recipe for authenticated HTTP proxies across current browser and Selenium combinations. Do not assume that putting a username and password in a proxy URL will work everywhere. Check the proxy provider or administrator’s instructions alongside the documentation for your browser, driver, and Selenium binding. Keep credentials out of source control and logs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Python API lists SOCKS username and password fields, but that alone does not establish how HTTP proxy authentication works. In a corporate environment, ask your administrator whether browser traffic, Selenium Manager traffic, or both must use a company proxy.

Verify the configuration and troubleshoot failures

  1. Identify which traffic is failing. If the browser cannot reach a page after the session starts, check the browser proxy capability. If browser or driver management fails before the session exists, check Selenium Manager’s proxy configuration.
  2. Check the endpoint and mode. Confirm the hostname, port, protocol, and proxy type with the provider or network administrator. The manual example uses a host-and-port string.
  3. Check network policy. Confirm that the machine running the browser can reach the proxy and that the proxy permits the requested destination. For company networks, ask which outbound traffic must use the corporate proxy.
  4. Handle authentication separately. If the proxy requires login, follow the provider’s browser- and binding-specific method; the simple example does not configure authentication.
  5. Test with an approved destination. Use a permitted test endpoint and an approved diagnostic method to confirm the route. A successful WebDriver session alone does not prove that page traffic used the intended proxy.

Or skip the browser setup: use ScreenshotNeo

If your goal is to capture a website rather than automate an interactive browser workflow, ScreenshotNeo offers a screenshot API and MCP server. A single GET request returns a PNG, JPEG, WebP, or PDF. Its cleanup steps accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. AI agents can use its MCP tools: take_screenshot, get_page_info, and capture_pdf.

For example, save a WebP capture of a URL with cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. The same request in Python is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Or in Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Version context

The Selenium Python proxy reference reviewed identifies Selenium 4.49.0. Selenium’s documentation also has a 4.50.0 API index, so check the current references when publishing or upgrading: API versions can advance, and the examples here are not a claim that every browser and driver combination has been tested.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.