Skip to content

Playwright Testing

Playwright Testing is a Node library written by Microsoft to automate browsers. It's created by the same team that originally built Puppeteer at Google.

Fabricantes: HeadlessTesting
Category: Banco de Dados
Learn more about Playwright Testing

Request a Quote

What is Playwright Testing?

Playwright test

Playwright Testing is a Node library written by Microsoft to automate browsers. It's created by the same team that originally built Puppeteer at Google.

Installing Playwright Testing

To install Playwright Testing, you can use yarnou npm:

npm i --save playwright

Running your first playwright test

To run your first test, use this example:

Chrome

const pw = require('playwright');

(async() => {

const browser = await pw.chromium.connect({

wsEndpoint: 'wss://chrome.headlesstesting.com?token=[YOUR-TOKEN]&browserVersion=dev',

});

const context = await browser.newContext();

const page = await context.newPage();

 

await page.goto('https://headlesstesting.com/');

await page.screenshot({ path: 'screenshot.png' });

 

await browser.close();

})();

Updating your existing Playwright Testing scripts

With a Playwright Testing test, you usually launch a browser with await pw.chromium.launch()

To start using the service, simply replace this line with the browser endpoint:

Before

const browser = await pw.chromium.launch();

After

await pw.chromium.connect({

wsEndpoint: 'wss://chrome.headlesstesting.com?token=[YOUR-TOKEN]&browserVersion=dev',

});

System Requirements:

CPU: 1.8 GHz dual core processor

RAM: 2 GB

HDD/SSD: 50 GB of free space on main drive

Operating system: Microsoft Windows 8 32-bit, Microsoft Windows 7 32-bit, and Microsoft Windows Vista 32-bit

Resolution: 1024×768

We help you choose

Not sure which software
you need?

Tell us about your need and our team helps you choose the ideal solution — from over 10,000 options in our catalog.