> 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/proxy-integrations/mobile-proxies-guides/playwright-1.md).

# Playwright

[**Playwright**](https://playwright.dev/) is a Node.js library that lets you script and automates browsers using the same API, like Chrome, Firefox, and Safari. It is a convenient framework for automation and testing purposes.&#x20;

To integrate Playwright with Oxylabs [**Mobile Proxies**](broken://pages/eYMMTTtlFtHGyIImh1Gv)**,** follow the steps below:

**Step 1.** Install Node.js and a code editor of your choice. (Skip this step If you already have it)

**Step 2.** Create a Node.js project and install the required packages.&#x20;

**Step 3.** Within Playwright, fill in the `'proxy'` values:

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

{% hint style="info" %}
You can also use random or sticky country-specific entries. For example, if you enter `http://us-pr.oxylabs.io:10000`, you’ll acquire a US exit node. If you enter `10001` under **port**, you’ll receive the US exit node with a sticky session. You can find a complete list of country-specific random proxy entry nodes [**here**](https://developers.oxylabs.io/proxies/residential-proxies/country-specific-entry-nodes#random-proxy-entry-nodes) and a list of sticky proxy entry nodes - [**here**](https://developers.oxylabs.io/proxies/residential-proxies/country-specific-entry-nodes#sticky-proxy-entry-nodes).
{% endhint %}

**Username:** `'Oxylabs' proxy user username'`

**Password:** `'Oxylabs' proxy user password'`

An example of a code looks like this:

```
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();
    }
})();
```

And that's it! You've successfully integrated Oxylabs Mobile Proxies with Playwright.

If you want to learn more about web scraping with Playwright, read our [**blog post**](https://oxylabs.io/blog/playwright-web-scraping).

Find the original Playwright integration blog post [here](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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
