Thordata Docs
English
English
  • Overview
  • PROXIES
    • Integration Tutorial
      • Residential Proxies Integration
        • AdsPower
        • BitBrowser
        • ClonBrowser
        • Playwright
        • Puppeteer
        • Selenium
        • Ghost Browser
        • SwitchyOmega
        • FoxyProxy
        • Chrome
        • Edge
        • MuLogin
      • ISP Proxies Integration
        • AdsPower
        • BitBrowser
        • ClonBrowser
        • Ghost Browser
        • SwitchyOmega
        • FoxyProxy
        • Chrome
        • Edge
      • Datacenter Proxies Integration
        • AdsPower
        • BitBrowser
        • ClonBrowser
        • Ghost Browser
        • SwitchyOmega
        • FoxyProxy
        • Chrome
        • Edge
      • Unlimited Proxies Integration
        • AdsPower
        • BitBrowser
        • ClonBrowser
        • Ghost Browser
        • SwitchyOmega
        • FoxyProxy
        • Chrome
        • Edge
    • Residential Proxies
      • Getting Started Guide
      • Endpoint Generator
        • User & Pass auth
        • Whitelisted IPs
          • Country Entry
            • Country/Region Entry Node
          • API Link
      • Users
      • Basic Query
      • location Settings
        • Country / Region
        • City
        • State
      • Session Control
      • Protocols
      • Country/Region list
      • CDKEY Generation and Redemption
    • ISP Proxies
      • Getting Started Guide
    • Datacenter Proxies
      • Getting Started Guide
    • Unlimited Proxy Servers
      • Endpoint Generator
        • User & Pass auth
        • Whitelisted IPs
          • Country Entry
          • API Link
      • Users
      • Country/Region list
  • Scraping
    • SERP API
      • Quick Start Guide
      • Configuration
      • API Playground
      • SSL Certificate
      • Send Your First Request
      • Parsed JSON Result
      • SERP API Google Query Parameters
      • SERP API Bing Query Parameters
    • WEB Scraper API
      • Getting Started Guide
      • API request builder
  • FREE TOOLS
    • Chrome Extension
      • Tutorial
  • USEFUL LINKS
    • Dashboard Center
  • FAQ
    • Product Problem
      • How do I choose the right proxy package?
      • How to target specific countries/regions?
      • How to target a specific city?
      • What is Unlimited Proxies?
      • The IP test result does not match the region where the extraction was purchased?
    • Payment Problem
      • What payment methods are supported?
      • What should I do if I buy the wrong package?
      • Do you provide refunds for paid services?
      • After payment, how long does it take to receive my agency balance or activate my account?
  • SUPPORT
    • Contact Us
Powered by GitBook
On this page

Was this helpful?

  1. PROXIES
  2. Integration Tutorial
  3. Residential Proxies Integration

Playwright

PreviousClonBrowserNextPuppeteer

Last updated 3 months ago

Was this helpful?

What is Playwright?

Built by Microsoft, is a Node.js library that, with a single API, automates websites and web apps running on Chromium, Firefox, and WebKit. These APIs can be used by developers writing JavaScript code to create new browser pages, navigate to URLs, and then interact with elements on a page. In addition, since Microsoft Edge is built on the open-source Chromium web platform, Playwright can also automate Microsoft Edge.

Here's how to integrate Thordata with Playwright.

1

Installing Playwright

Get started by installing Playwright using npm, yarn or pnpm. Alternatively you can also get started and run your tests using the VS Code Extension.

2

Fill in the proxy value in Playwright

Server: t.pr.thordata.net:9999

Username: td-customer-USERNAME

Password: PASSWORD

Code Sample:

const playwright = require('playwright');
(async () => {
    for (const browserType of ['chromium', 'firefox', 'webkit']) {
        const browser = await playwright[browserType].launch({
            headless: false,
            proxy: {
                server: 'http://t.pr.thordata.net:9999',
                username: 'td-customer-USERNAME',
                password: 'PASSWORD'
            },
        });
        const context = await browser.newContext();
        const page = await context.newPage();
        await page.goto('https://ipinfo.thordata.com');
        await page.screenshot({ path: `${browserType}.png` });
        await browser.close();
    }
})();

to view the detailed installation tutorial

Click here
Playwright