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

selenium-web-checker

v1.11.1

Published

Selenium web checker

Downloads

5

Readme

Selenium Web Checker

npm

Automation script to record and track visual changes in web sites.

Usage

Installation

# chromedriver required
npm install -g chromedriver
# module install
npm install -g selenium-web-checker

Basic usage (URL check)

selenium-web-checker URL [BaseURL] [width] [height]

Example : selenium-web-checker / https://www.google.com 1024 768

Advanced usage

selenium-web-checker config.json [BaseURL|''] [width] [height] [outputPath]

Where config.json is a JSON configuration file with a list of pages to test:

{
    "baseURL" : "http://192.168.99.100",
    "screenshots" : true,
    "fileOutput" : true,
    "pages" : [
        { 
            "id" : "login",
            "url" : "/user/login", 
            "actions" :  [
                {
                    "xpath" : "//input[@name='user']",
                    "submit" : "username"
                },
                {
                    "xpath" : "//input[@name='password']",
                    "submit" : "password"
                },
                {
                    "xpath" : "//button[@type='submit']",
                    "click" : true
                }
            ]
        },
        {
            "id" : "home",
            "url" : "/home"
        }
    ]
}

Additional parameters

  • baseURL : (Optional) To test pages with a different base URL (overwrites baseURL in config.json)
  • screenshots : true to activate screenshots by page (it uses id attribute to name file, or the page position in config if no id is defined )
  • fileOutput : true to activate file output separated logs (one by each page)
  • width : Browser window width (default: 1200)
  • height : Browser window height (default: 900)

Results

The results are written in a JSON-like format. It includes visual information about HTML dom elements (position, width, height, margin, padding) You can make diffs with previous versions to check what's changing between scannings.

{"tag":"DIV","id":"app","orig":"242.5px 150px","w":"485px","h":"300px","nodes":1,"text":""}
  {"tag":"DIV","orig":"242.5px 150px","w":"485px","h":"300px","nodes":3}
    {"tag":"UL","orig":"242.5px 0px","w":"485px","nodes":0}
    {"tag":"DIV","orig":"242.5px 150px","w":"485px","h":"300px","nodes":3}
      {"tag":"HEADER","orig":"242.5px 108.5px","w":"485px","h":"217px","nodes":4}
        {"tag":"DIV","id":"header","orig":"121.25px 38px","w":"242.5px","h":"76px","pd":"10px","nodes":7}
          {"tag":"A","orig":"0px 0px","w":"auto","h":"auto","nodes":1,"text":"skip to package search"}
          {"tag":"A","orig":"0px 0px","w":"auto","h":"auto","nodes":1,"text":"skip to main content"}
          {"tag":"SPAN","orig":"0px 0px","w":"auto","h":"auto","nodes":4}
            {"tag":"A","orig":"0px 0px","w":"auto","h":"auto","nodes":1,"text":"skip to sign up"}
            {"tag":"A","orig":"0px 0px","w":"auto","h":"auto","nodes":1,"text":"skip to sign in"}
          {"tag":"A","orig":"0px 0px","w":"auto","h":"auto","nodes":1,"text":"skip to footer"}