Firefox (Legacy)

Headless Browser supports two specialized browser environments, one of which is Firefox. Please note this environment will be deprecated soon.

A Firefox-based browser environment can be tested when Chrome environment fails to provide acceptable results. Firefox environment evades bot detection through built-in modifications and automatic proxy integration.

circle-info

The Firefox endpoint supports two Playwright versions: 1.51 and 1.56. Other versions are not supported. You can specify the Playwright version via the o_pw parameter, for example:

wss://USER:[email protected]?o_pw=1.56

Connection details

Connect to UBS using the following WebSocket endpoint:

wss://ubs.oxylabs.io

Important considerations

  • Requires explicit use of the firefox implementation in automation libraries

  • May require minor adjustments compared to Chrome-based solutions

Basic usage

from playwright.sync_api import sync_playwright

username = "your-username"
password = "your-password"
endpoint = "ubs.oxylabs.io"
browser_url = f"wss://{username}:{password}@{endpoint}"

with sync_playwright() as p:
    browser = p.firefox.connect(browser_url, timeout=60000)
    page = browser.new_page()
    page.goto('https://example.com')
    browser.close()

United States proxy infrastructure

Users, who mainly operate in the US, can connect directly to US-based infrastructure via the special entry point. This ensures faster loading time and better browsing efficiency. To establish connection, select the following:

Code examples:

circle-info

Note: this solution primarily shortens the response time for the US-based users, and should not be confused with proxy geo-location selection. More on that in the following section.

Country selection

You can specify a country for your browser session by adding the ?p_cc parameter to your connection URL. Here are examples:

If no country is specified, the system will automatically assign one based on availability.

Was this helpful?