🚀 Macaca Playwright driver

Overview

macaca-playwright


NPM version CI Test coverage node version

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API. Macaca Playwright is a long-term maintained browser driver as a candidate for Macaca Playwright driver.

Contributors


xudafeng


snapre

This project follows the git-contributor spec, auto updated at Thu Apr 14 2022 23:05:55 GMT+0800.

Installment

$ npm i macaca-playwright -g

Usage as module

const fs = require('fs');
const path = require('path');
const Playwright = require('macaca-playwright');

const playwright = new Playwright();

async function() {
  /**
    default options
    {
      headless: false,
      x: 0,
      y: 0,
      width: 800,
      height: 600,
      userAgent: 'userAgent string'
    }
  */
  await playwright.startDevice({
    headless: true // in silence
  });

  await playwright.maximize();
  await playwright.setWindowSize(null, 500, 500);
  await playwright.get('https://www.baidu.com');
  const imgData = await playwright.getScreenshot();
  const img = new Buffer(imgData, 'base64');
  const p = path.join(__dirname, '..', 'screenshot.png')
  fs.writeFileSync(p, img.toString('binary'), 'binary');
  console.log(`screenshot: ${p}`);

  await playwright.stopDevice();
};
You might also like...

Automagically bypass hcaptcha challenges with http api, with puppeteer, selenium, playwright browser automation scripts to bypass hCaptcha programmatically

Automagically bypass hcaptcha challenges with http api, with puppeteer, selenium, playwright browser automation scripts to bypass hCaptcha programmatically. For help you can message on discord server with the bellow link. You can also create an issue.

Jan 2, 2023

Nuxt3 template with Windicss + Pinia + Vitest + Playwright

Nuxt3 template with Windicss + Pinia + Vitest + Playwright

Nuxt 3 Template Nuxt 3 template repository Look at the nuxt 3 documentation to learn more. Used Technologies Usage Setup Make sure to install the depe

Dec 14, 2022

🤖 Persist the Playwright executable between Netlify builds

🤖 Persist the Playwright executable between Netlify builds

🤖 Netlify Plugin Playwright Cache Persist the Playwright executables between Netlify builds. Why netlify-plugin-playwright-cache When you install pla

Oct 24, 2022

A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Prisma ORM. Deploys to Fly.io

A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Prisma ORM. Deploys to Fly.io

Live Demo · Twitter A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Pris

Oct 31, 2022

Scrape tweets from Twitter search results based on keywords and date range using Playwright. Save scraped tweets in a CSV file for easy analysis

Tweet Harvest (Twitter Crawler) Tweet Harvest is a command-line tool that uses Playwright to scrape tweets from Twitter search results based on specif

Aug 9, 2023

The Official MongoDB Node.js Driver

The Official MongoDB Node.js Driver

MongoDB NodeJS Driver The official MongoDB driver for Node.js. NOTE: v3.x released with breaking API changes. You can find a list of changes here. Ver

Dec 28, 2022

DataStax Node.js Driver for Apache Cassandra

DataStax Node.js Driver for Apache Cassandra® A modern, feature-rich and highly tunable Node.js client library for Apache Cassandra and DSE using excl

Dec 30, 2022

Framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. 🗺️ Remix driver included. 🤟

Framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. 🗺️ Remix driver included. 🤟

About routes-gen is a framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. Think of it as Prisma,

Jan 2, 2023

The high efficent browser driver on top of puppeteer, ready for production scenarios.

The high efficent browser driver on top of puppeteer, ready for production scenarios.

browserless is an efficient driver for controlling headless browsers built on top of puppeteer developed for scenarios where performance matters. High

Jan 6, 2023

Portuguese version of the Cassandra driver javascript node.js workshop

Versão em Português do workshop Cassandra driver javascript node.js Olá e bem-vindo! Este é o repositório complementar para a apresentação prática dos

Mar 17, 2022

A Fetch API-compatible PlanetScale database driver

PlanetScale Serverless Driver for JavaScript A Fetch API-compatible PlanetScale database driver for serverless and edge compute platforms that require

Dec 27, 2022

a simple wrapper nestjs dynamic module on top of surrealdb.js driver, with a consumer app to show case library in action, nothing fancy

README README Project Components Dynamic Module Consumer App Install SurrealDb Starts SurrealDb Init surrealDb Database Run App from Source Code Launc

Oct 3, 2022

Diferentes demos em relação ao uso do Playwright para realização de palestras sobre o assunto

🎭 Playwright [Demos] - Palestra: Testes Inteligentes, Automatizados e Rápidos em Cross-Browser com Playwright! Repositório responsável pelas demos re

Oct 20, 2022

Google-reviews-crawler - A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file.

google-reviews-crawler A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file. Usage Clone the repo, install the de

Oct 26, 2022

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

🎭 Playwright Documentation | API reference Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit w

Jan 9, 2023

Modern Cross Browser Testing in JavaScript using Playwright

 Modern Cross Browser Testing in JavaScript using Playwright

Modern Cross Browser Testing in JavaScript using Playwright This repository contains the example code for the Modern Cross Browser Testing in JavaScri

Oct 3, 2022

Command line tool that automatically migrates tests from protractor to playwright.

Protractor to Playwright migration tool This tool is designed to automatically migrate code from Protractor to Playwright. It is inspired by the "Migr

Nov 20, 2022

Remix + Cloudflare Workers + Wrangler2 + Tailwind + ESLint + Prettier + Vitest + Playwright

Welcome to Remix! Remix Docs Development You will be running two processes during development: The Miniflare server (miniflare is a local environment

Dec 19, 2022

Sample project to demonstrate Playwright Test usage, pointing to ServeRest API and Front-end

demo-playwright-test This is a sample project to demonstrate Playwright Test usage, running tests against ServeRest API and Front-end. Pre-requisites

Oct 24, 2022
Owner
Macaca
Solution with Automation anywhere
Macaca
The high efficent browser driver on top of puppeteer, ready for production scenarios.

browserless is an efficient driver for controlling headless browsers built on top of puppeteer developed for scenarios where performance matters. High

microlink.io 1.2k Jan 6, 2023
Portuguese version of the Cassandra driver javascript node.js workshop

Versão em Português do workshop Cassandra driver javascript node.js Olá e bem-vindo! Este é o repositório complementar para a apresentação prática dos

DataStax Developers 2 Mar 17, 2022
A Fetch API-compatible PlanetScale database driver

PlanetScale Serverless Driver for JavaScript A Fetch API-compatible PlanetScale database driver for serverless and edge compute platforms that require

PlanetScale 255 Dec 27, 2022
a simple wrapper nestjs dynamic module on top of surrealdb.js driver, with a consumer app to show case library in action, nothing fancy

README README Project Components Dynamic Module Consumer App Install SurrealDb Starts SurrealDb Init surrealDb Database Run App from Source Code Launc

Mário Monteiro 0 Oct 3, 2022
Diferentes demos em relação ao uso do Playwright para realização de palestras sobre o assunto

?? Playwright [Demos] - Palestra: Testes Inteligentes, Automatizados e Rápidos em Cross-Browser com Playwright! Repositório responsável pelas demos re

Glaucia Lemos 47 Oct 20, 2022
Google-reviews-crawler - A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file.

google-reviews-crawler A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file. Usage Clone the repo, install the de

￸A￸l￸e￸x D￸o￸m￸a￸k￸i￸d￸i￸s 6 Oct 26, 2022
Modern Cross Browser Testing in JavaScript using Playwright

Modern Cross Browser Testing in JavaScript using Playwright This repository contains the example code for the Modern Cross Browser Testing in JavaScri

Applitools 5 Oct 3, 2022
Command line tool that automatically migrates tests from protractor to playwright.

Protractor to Playwright migration tool This tool is designed to automatically migrate code from Protractor to Playwright. It is inspired by the "Migr

Amadeus IT Group 9 Nov 20, 2022
Remix + Cloudflare Workers + Wrangler2 + Tailwind + ESLint + Prettier + Vitest + Playwright

Welcome to Remix! Remix Docs Development You will be running two processes during development: The Miniflare server (miniflare is a local environment

null 48 Dec 19, 2022
Sample project to demonstrate Playwright Test usage, pointing to ServeRest API and Front-end

demo-playwright-test This is a sample project to demonstrate Playwright Test usage, running tests against ServeRest API and Front-end. Pre-requisites

Stefan Teixeira 30 Oct 24, 2022