Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clickr

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clickr

Automated clicker

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

clickr

I have build an NPM package (and Chrome extension) to automate and test your JavaScript.

Example

Here is an example test script:

var list = [
    {
        function: 'testFunction',
        params: [
            'example value'
        ],
        delay: 2000,
        check: {
            example: 'example value'
        }
    },
    {
        input: 'input[name=email]:eq(0)',
        check: 'test@example.com',
        value: 'test@example.com'
    },
    {
        event: 'button[form=login]:eq(0)',
        type:  'click'
    }
];

var test = new Clickr(list);

test.run();

Function

First you see a test that calls a function. In this case the function testFunction. There is also 1 param send, so the script will call testFunction('example value'). You can also delay tests, e.g. if you know that some tests only can run after x time. The default delay is 100ms. If the function returns an object, you can check if the values are the same you expected.

You can also add a function to your test script, and used in your test.

Input

The next test will search for input elements. You can check if the value is the same you expected, and you can set a new value. Both are optional.

Event

The last test will scroll to an element, and trigger an event on an element, e.g. click.

Results

When you run a test, you receive in your Devtools console a result, e.g. Clickr result

Keywords

FAQs

Package last updated on 07 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc