AUTOMATION FRAMEWORK INTEGRATION

HOW TO USE PROXY POLAND WITH SELENIUM

Python and Node.js code examples for routing Selenium WebDriver through dedicated 4G mobile proxies.

OVERVIEW

WHY SELENIUM + PROXY POLAND

Selenium is the most widely used browser automation framework. By routing Selenium through Proxy Poland's dedicated 4G mobile proxies, you can scrape data, run tests, and automate tasks with genuine mobile IPs that bypass anti-bot detection.

STEP-BY-STEP GUIDE

SETUP INSTRUCTIONS

01

Install Dependencies

Install Selenium and the webdriver for your browser:

pip install selenium webdriver-manager
# or for Node.js:
npm install selenium-webdriver
02

Get Proxy Credentials

Sign up at proxypoland.com and get your proxy IP, port, username, and password.

03

Configure Chrome with Proxy (Python)

Set up Chrome WebDriver with SOCKS5 proxy:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

PROXY = "socks5://username:password@proxy-ip:port"

options = Options()
options.add_argument(f'--proxy-server={PROXY}')

driver = webdriver.Chrome(options=options)
driver.get('https://whatismyipaddress.com')
print(driver.title)
driver.quit()
04

Configure with HTTP Proxy (Python)

Alternative HTTP proxy configuration:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

PROXY = "http://username:password@proxy-ip:port"

options = Options()
options.add_argument(f'--proxy-server={PROXY}')

driver = webdriver.Chrome(options=options)
driver.get('https://httpbin.org/ip')
print(driver.page_source)
driver.quit()
05

Configure with Node.js

Selenium WebDriver with proxy in Node.js:

const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');

const options = new chrome.Options();
options.addArguments(
  '--proxy-server=socks5://username:password@proxy-ip:port'
);

const driver = new Builder()
  .forBrowser('chrome')
  .setChromeOptions(options)
  .build();

await driver.get('https://httpbin.org/ip');
console.log(await driver.getTitle());
await driver.quit();
06

Add IP Rotation

Rotate IP between scraping sessions:

import requests

def rotate_ip():
    """Call Proxy Poland's rotation API"""
    response = requests.get(
        'https://your-proxy-ip:port/rotate',
        auth=('username', 'password')
    )
    return response.json()

# Rotate before each session
rotate_ip()
driver = webdriver.Chrome(options=options)
# ... scrape with new IP
07

Verify Your IP

Check that Selenium is using the proxy IP:

driver.get('https://httpbin.org/ip')
ip_text = driver.find_element('tag name', 'pre').text
print(f'Current IP: {ip_text}')
# Should show a Polish mobile IP
EXPERT ADVICE

PRO TIPS

Use SOCKS5 for full traffic routing including DNS queries

Add --headless flag for production scraping

Implement exponential backoff for rate-limited sites

Rotate IPs between page loads for large-scale scraping

Use undetected-chromedriver for sites with advanced bot detection

POPULAR USE CASES

WORKS GREAT FOR

Web scraping at scalePrice monitoringSEO rank trackingAd verificationQA testing with geo-specific IPs
FREQUENTLY ASKED

FAQ

Which proxy protocol is best for Selenium?+

SOCKS5 for maximum compatibility and DNS leak prevention. HTTP works for basic scraping but SOCKS5 routes all traffic including DNS through the proxy.

Can I use Selenium with undetected-chromedriver and these proxies?+

Yes. undetected-chromedriver + Proxy Poland's mobile proxies is the best combination for scraping protected sites. The mobile IP bypasses IP-based detection while undetected-chromedriver handles browser fingerprint checks.

How do I handle proxy authentication in Selenium?+

For Chrome, include credentials in the proxy URL: socks5://user:pass@host:port. For Firefox, use a proxy authentication extension or selenium-wire which handles auth transparently.

Can I run headless Selenium with these proxies?+

Yes. Add --headless=new to Chrome options. The proxy works identically in headless mode. For sites that detect headless browsers, use undetected-chromedriver.

How fast can I scrape with mobile proxies vs datacenter?+

30-100 Mb/s throughput on our 4G connections. While slower than raw datacenter speed, the advantage is that you don't get blocked. One successful request through a mobile proxy is worth more than 100 blocked requests through a datacenter IP.

TRY ITFREE FOR 1 HOUR

Set up Selenium with a dedicated 4G mobile proxy in under 2 minutes. No credit card required. Full proxy access during your trial.

No commitment Β· Cancel anytime Β· Setup in 2 minutes