> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/integrations/es/proxy-integrations/mobile-proxies-guides/playwright-1.md).

# Playwright

[**Playwright**](https://playwright.dev/) es una biblioteca de Node.js que te permite programar y automatizar navegadores usando la misma API, como Chrome, Firefox y Safari. Es un framework conveniente para fines de automatización y pruebas.&#x20;

Para integrar Playwright con Oxylabs [**Mobile Proxies**](broken://pages/820d41bc13c7b4646c36aa696a1c8df5933d5d56)**,** siga los pasos a continuación:

**Paso 1.** Instala Node.js y un editor de código de tu elección. (Omite este paso si ya lo tienes)

**Paso 2.** Crea un proyecto de Node.js e instala los paquetes necesarios.&#x20;

**Paso 3.** Dentro de Playwright, completa el `'proxy'` valores:

**Servidor**: `'http://pr.oxylabs.io:7777'`

{% hint style="info" %}
También puedes usar entradas aleatorias o estáticas específicas por país. Por ejemplo, si ingresas `http://us-pr.oxylabs.io:10000`, obtendrás un nodo de salida de EE. UU. Si ingresas `10001` en **puerto**, recibirás el nodo de salida de EE. UU. con una sesión estática. Puedes encontrar una lista completa de nodos de entrada de proxy aleatorios específicos por país [**aquí**](https://developers.oxylabs.io/proxies/residential-proxies/country-specific-entry-nodes#random-proxy-entry-nodes) y una lista de nodos de entrada de proxy estáticos - [**aquí**](https://developers.oxylabs.io/proxies/residential-proxies/country-specific-entry-nodes#sticky-proxy-entry-nodes).
{% endhint %}

**Nombre de usuario:** `'Oxylabs' nombre de usuario del usuario proxy`

**Contraseña:** `'Oxylabs' contraseña de usuario del proxy`

Un ejemplo de código se ve así:

```
const playwright = require('playwright');
(async () => {
    for (const browserType of ['chromium', 'firefox', 'webkit']) {
        const browser = await playwright[browserType].launch({
            headless: false,
            proxy: {
                server: 'http://pr.oxylabs.io:7777',
                username: 'USERNAME',
                password: 'PASSWORD'
            },
        });
        const context = await browser.newContext();
        const page = await context.newPage();
        await page.goto('https://ip.oxylabs.io');
        await page.screenshot({ path: `${browserType}.png` });
        await browser.close();
    }
})();
```

¡Y eso es todo! Has integrado correctamente Oxylabs Mobile Proxies con Playwright.

Si quieres aprender más sobre el web scraping con Playwright, lee nuestra [**artículo del blog**](https://oxylabs.io/blog/playwright-web-scraping).

Encuentra la publicación original del blog sobre la integración de Playwright [aquí](https://oxylabs.io/resources/integrations/playwright).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.oxylabs.io/integrations/es/proxy-integrations/mobile-proxies-guides/playwright-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
