Skip to content

Smoke Test

Status: NEEDS-ACCOUNT

Classification: NEEDS-ACCOUNT (cloud API) Install method: No dedicated SDK. Use Playwright (pip install playwright or npm install puppeteer) as the client. Connect via the Oxylabs WebSocket endpoint. Cost tier: Paid plans. Contact Oxylabs or see oxylabs.io for current pricing. No meaningful free tier for Headless Browser. What is required: An Oxylabs account at oxylabs.io with the Headless Browser product enabled, plus a valid username and password. No self-hosted option.

What to test

Because Oxylabs Headless Browser is a remote cloud service (not a local binary), there is no --version flag or offline check. The smoke test is a live connection: connect to the WSS endpoint, load a page, and assert the returned title matches what a real browser would see.

Python smoke test

Save the following as smoke_test.py and run it:

python
from playwright.sync_api import sync_playwright

USERNAME = "your-oxylabs-username"
PASSWORD = "your-oxylabs-password"
browser_url = f"wss://{USERNAME}:{PASSWORD}@ubc.oxylabs.io"

with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(browser_url)
    page = browser.new_page()
    page.goto("https://example.com")
    title = page.title()
    print(f"Page Title: {title}")
    assert "Example" in title, f"Unexpected title: {title}"
    print("SMOKE TEST PASSED")
    browser.close()

Run it:

bash
python smoke_test.py

Expected success output

Page Title: Example Domain
SMOKE TEST PASSED

Node.js smoke test

javascript
const puppeteer = require('puppeteer');

const browserUrl = `wss://USERNAME:PASSWORD@ubc.oxylabs.io`;

(async () => {
  const browser = await puppeteer.connect({ browserWSEndpoint: browserUrl });
  const page = await browser.newPage();
  await page.goto('https://example.com');
  const title = await page.title();
  console.log('Page Title:', title);
  if (!title.includes('Example')) throw new Error(`Unexpected title: ${title}`);
  console.log('SMOKE TEST PASSED');
  await browser.close();
})();

Run it:

bash
node smoke_test.js

What failure looks like

ErrorLikely cause
WebSocket connection failedWrong credentials or endpoint URL
TimeoutError: Connecting to browser...Account not enabled for Headless Browser
403 ForbiddenSubscription inactive or quota exhausted
Title assertion failsTarget page structure changed or CAPTCHA not yet resolved

IP verification

To confirm which proxy IP your session is using, navigate to the Oxylabs IP checker:

python
page.goto("https://ip.oxylabs.io/json")
print(page.content())

Do not use third-party IP checkers (ipinfo.io, iplocation.net) as they are restricted targets.