Integrate with Selenium
Use Aluvia's mobile network connectivity with Selenium for browser automation, testing, and data extraction using real mobile IP addresses.
Setup Steps
- Get your proxy credentials in your Aluvia Dashboard
- Install Selenium WebDriver (and the browser driver you plan to use)
- Configure Selenium to use the Aluvia with Selenium
Sample Code
const { Builder } = require("selenium-webdriver");
const chrome = require("selenium-webdriver/chrome");
const PROXY_USER = "your_credential_username";
const PROXY_PASS = "your_credential_password";
const PROXY_HOST = "gateway.aluvia.io";
const PROXY_PORT = 8080;
const PROXY_URL = `http://${PROXY_USER}:${PROXY_PASS}@${PROXY_HOST}:${PROXY_PORT}`;
(async () => {
const options = new chrome.Options();
options.addArguments(`--proxy-server=${PROXY_URL}`);
options.addArguments("--headless=new");
const driver = await new Builder()
.forBrowser("chrome")
.setChromeOptions(options)
.build();
await driver.get("https://ipconfig.io/json");
const body = await driver.findElement({ css: "body" }).getText();
console.log(body);
await driver.quit();
})();