npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@owloops/flybird

v1.2.5

Published

Flybird is a library which provides an API to play Owloops recordings created using Owloops Chrome Recorder](https://github.com/Owloops/owloops-chrome-recorder)

Downloads

9

Readme

Logo

@owloops/flybird

npm version Commitizen friendly

This repo provides tools to replay Owloops Tests exported from Google Chrome DevTools' Recordings programmatically.

Install Owloops Chrome Recorder extension if you want to export the recordings directly from the Chrome DevTools' Recorder UI.

Refer to all the supported actions at Owloops API documentation

asciicast

Installation

Install @owloops/flybird with npm

  npm install -g @owloops/flybird

To replay recordings using Puppeteer, install Puppeteer as well:

  npm install -g puppeteer

Usage

Via CLI

Download this example recording and save it as recording.json.

Using CLI + npx:

npx @owloops/flybird recording.json

Using CLI + package.json:

In your package.json add a new script to invoke the flybird command:

{
  "scripts": {
    "flybird": "flybird recording.json"
  }
}

You can also give folder name as a parameter to run all the files in a folder.

Using CLI + npx:

npx @owloops/flybird all-recordings # runs all recordings in the "all-recordings" folder.

Using CLI + package.json:

{
  "scripts": {
    "flybird": "flybird all-recordings"
  }
}

Set the PUPPETEER_HEADLESS environment variable or --headless CLI flag to control whether the browser is start in a headful or headless mode. For example,

PUPPETEER_HEADLESS=true npx @puppeteer/replay recording.json # runs in headless mode, the default mode.
PUPPETEER_HEADLESS=false npx @puppeteer/replay recording.json # runs in headful mode.

Run npx @puppeteer/replay --help to see all CLI options.

Via Import

import { owl } from '@owloops/flybird';
import puppeteer from "puppeteer";

const testResults = await owl({
        headless: false,
        puppeteer,
        actions: [
        {
            "action": "goto",
            "options": {
                "url": "https://duckduckgo.com/?"
            }
        },
        {
            "action": "click",
            "options": {
                "querySelector": "#search_form_input_homepage",
                "rightClick": false,
                "preferredSelector": "querySelector",
                "xpathSelector": "xpath///*[@id=\"search_form_input_homepage\"]",
                "offsetX": 378.2312469482422,
                "offsetY": 27.162506103515625
            }
        },
        {
            "action": "input",
            "options": {
                "querySelector": "#search_form_input_homepage",
                "preferredSelector": "querySelector",
                "type": "input",
                "value": "Owloops",
                "xpathSelector": "xpath///*[@id=\"search_form_input_homepage\"]"
            }
        },
        {
            "action": "enter",
            "options": {}
        },
    ]});

return testResults;

License

license

This project is licensed under the terms of the GPLv3 license.

Credits

The initial implementation was inspired by @puppeteer/replay