proxyapi. från Hugo & Friends AB
← All examples

03 / Playwright

Country-level localisation testing

Check language, currency, and regional content by changing the country in the proxy username.

You will build

The same test suite across markets

QAGeo
Playwright
import { chromium } from "playwright";

const country = (process.env.TEST_COUNTRY ?? "se").toLowerCase();
const key = process.env.PROXYAPI_KEY;
const browser = await chromium.launch({
  proxy: {
    server: "https://proxy.proxyapi.se:443",
    username: `${key}-country-${country}-type-residential`,
    password: "",
  },
});

const page = await browser.newPage();
await page.goto("https://your-app.example", { waitUntil: "networkidle" });
await page.screenshot({ path: `artifacts/home-${country}.png`, fullPage: true });
await browser.close();

Before production

  • Available countries depend on the active pool; build explicit skip behaviour into CI.
  • Use your own test environment when the test can create orders or other data.