---
title: Use Proxies with Playwright
description: Set up residential and mobile proxies for Playwright test automation to ensure IP rotation, location accuracy, and robust, undetectable testing environments.
---

[Skip to content](https://help.froxy.com/en/integrations/playwright#main-content)

- [English](https://help.froxy.com/en/integrations/playwright)
- [Русский](https://help.froxy.com/ru/integrations/playwright)

English

Show submenu for translations

[Create a ticket](https://help.froxy.com/en/kb-tickets/new?hsLang=en)

![froxy-logo.svg\]](https://help.froxy.com/hubfs/froxy-logo.svg)

Open main navigation

Close main navigation

- - [English](https://help.froxy.com/en/integrations/playwright)
    - [Русский](https://help.froxy.com/ru/integrations/playwright)

  English
  
  Show submenu for translations
- [Create a ticket](https://help.froxy.com/en/kb-tickets/new)
- [Go to froxy.com](https://froxy.com/)

[Go to froxy.com](https://froxy.com/)

 Welcome to the Help Center

- There are no suggestions because the search field is empty.

1. [Help Center Froxy](https://help.froxy.com/en?hsLang=en)
2. [Integrations](https://help.froxy.com/en/integrations?hsLang=en)
3. [Testing Utilities](https://help.froxy.com/en/integrations?hsLang=en#testing-utilities)

# Use Proxies with Playwright

## In this article, you will learn how to set up residential and mobile proxies for testing automation in Playwright.

1. To [use Playwright](https://playwright.dev/) and set up a proxy, paste this code example:
   
   ```
    const playwright = require('@playwright/test'); const launchOptions = {     proxy: {         server: 'proxy.froxy.com:9000',         username: 'login',         password: 'password'     } }; (async () => {     const defaultBrowser = await playwright['chromium'].launch({});     const context = await defaultBrowser.newContext();     const page = await context.newPage();     await page.goto('https://froxy.com/api/detect-ip');     console.log('chromium without proxy:', await page.textContent("*"));     await defaultBrowser.close();     for (const browserType of ['chromium', 'firefox', 'webkit']) {         const browser = await playwright[browserType].launch(launchOptions);         const context = await browser.newContext();         const page = await context.newPage();         try {             await page.goto('https://froxy.com/api/detect-ip');             console.log(`${browserType} with proxy:`, await page.textContent("*"));         } catch (e) {             console.log(e);         }         await browser.close();     } })();
   ```
2. Please add the proxy configuration to playwright.config.ts.
3. All server and port information is available in your Froxy Dashboard.
4. For more information, you can visit the [Playwright developer portal](https://playwright.dev/docs/intro).

If you still have any questions about the operation of our service [froxy.com](https://froxy.com/en), you can ask them in the online chat in the lower right corner of the site or contact support at [support@froxy.com](mailto:support@froxy.com).

- [General Proxy Info](https://help.froxy.com/en/general-proxy-info?hsLang=en#main-content)

    - [Basics](https://help.froxy.com/en/general-proxy-info?hsLang=en#basics)
    - [Residential Proxies](https://help.froxy.com/en/general-proxy-info?hsLang=en#residential-proxies)
    - [Mobile Proxies](https://help.froxy.com/en/general-proxy-info?hsLang=en#mobile-proxies)
    - [Datacenter Proxies](https://help.froxy.com/en/general-proxy-info?hsLang=en#datacenter-proxies)
    - [Fast Proxies](https://help.froxy.com/en/general-proxy-info?hsLang=en#fast-proxies)
    - [Proxy Features](https://help.froxy.com/en/general-proxy-info?hsLang=en#proxy-features)
- [Getting Started](https://help.froxy.com/en/getting-started?hsLang=en)
- [Dashboard](https://help.froxy.com/en/dashboard?hsLang=en#main-content)

    - [Basics](https://help.froxy.com/en/dashboard?hsLang=en#basics)
    - [Actions with Your Subscription](https://help.froxy.com/en/dashboard?hsLang=en#actions-with-your-subscription)
    - [Connection Recommendations](https://help.froxy.com/en/dashboard?hsLang=en#connection-recommendations)
- [Billing Information](https://help.froxy.com/en/billing-information?hsLang=en)
- [Referral Program](https://help.froxy.com/en/referral-program?hsLang=en)
- [Troubleshooting](https://help.froxy.com/en/troubleshooting?hsLang=en)
- [Integrations](https://help.froxy.com/en/integrations?hsLang=en#main-content)

    - [Scraping Tools (3rd-party)](https://help.froxy.com/en/integrations?hsLang=en#scraping-tools-3rd-party)
    - [Proxy Managers & Antidetect](https://help.froxy.com/en/integrations?hsLang=en#proxy-managers-antidetect)
    - [SEO Tools](https://help.froxy.com/en/integrations?hsLang=en#seo-tools)
    - [Social Media](https://help.froxy.com/en/integrations?hsLang=en#social-media)
    - [Sneaker Bots](https://help.froxy.com/en/integrations?hsLang=en#sneaker-bots)
    - [Testing Utilities](https://help.froxy.com/en/integrations?hsLang=en#testing-utilities)
- [Froxy Scraper](https://help.froxy.com/en/froxy-scraper?hsLang=en#main-content)

    - [General Froxy Scraper Settings](https://help.froxy.com/en/froxy-scraper?hsLang=en#general-froxy-scraper-settings)
    - [Marketplace Scrapers](https://help.froxy.com/en/froxy-scraper?hsLang=en#marketplace-scrapers)
    - [SERP Scrapers](https://help.froxy.com/en/froxy-scraper?hsLang=en#serp-scrapers)
    - [Positions Monitoring](https://help.froxy.com/en/froxy-scraper?hsLang=en#positions-monitoring)
    - [Utilities/Maps](https://help.froxy.com/en/froxy-scraper?hsLang=en#utilities-maps)
    - [Social Media](https://help.froxy.com/en/froxy-scraper?hsLang=en#social-media)

[![Froxy](https://help.froxy.com/hubfs/froxy-logo.svg "Froxy")](https://froxy.com/en/)

froxy.com Help Center

Copyright © 2026, Froxy - Premium Proxy Provider