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 🙏

© 2026 – Pkg Stats / Ryan Hefner

protractor-firefox-support

v2.0.0

Published

This lib contains implementation of basic actions which can be used for e2e testing in Firefox browser

Downloads

2,422

Readme

protractor-firefox-support

This is custom implementation of Actions class functions for e2e testing using Protractor framework in Firefox browser. If you use it, ⭐️ it.

Installation

You can simply install it into your project using this command:

npm install protractor-firefox-support --save

Examples of usage

Here are examples of custom functions usage. Functions presented as separated modules which can be imported in test files:

dragAndDrop (complete example here)

const support = require('protractor-firefox-support');

module.exports.performDnD = ({dragElmSelector = '.btn.btn-primary', dragElmIndex,
    draggable = false} = {}) => {
    const dropPoint = {x: 100, y: 100};
    const options = {makeDraggable: draggable, dropLocation: dropPoint};

    /**
     *  You can define dragElement index if there are more than
     *  one element with specified selector.
     */

    (dragElmIndex) ? options.dragElemIndex = dragElmIndex : null;

    /**
     *  Also you can pass selector instead of null, if you want to specify
     *  drop element.
     */
    return browser.executeScript(support.dragAndDrop, dragElmSelector, null, options);
}

openContextMenu(rightMouseClick, complete example here)

const support = require('protractor-firefox-support');

module.exports.openElementContextMenu = ({selector, elemIndex} = {}) => {
    const options = {location: {x: 100, y: 100}};

    /**
     *  If there are more elements which match specified selector, add elemIndex option.
     *  Property 'location' defines screen coordinates where context menu will be opened.
     */

    (elemIndex) ? options.elemIndex = elemIndex : null;
    return browser.executeScript(support.rightMouseBtnClick, selector, options);
}

mouseUp (complete example here)

const support = require('protractor-firefox-support');

module.exports.mouseUp = (pointCoordinates = {x: 100, y: 100}) => {
    return browser.executeScript(support.mouseUp, pointCoordinates);
}

mouseMove (complete example here)

const support = require('protractor-firefox-support');

module.exports.mouseMove = (pointCoordinates = {x: 100, y: 100}) => {
    return browser.executeScript(support.mouseMove, pointCoordinates);
}

mouseDown (complete example here)

const support = require('protractor-firefox-support');

module.exports.mouseDown = ({selector, index} = {}) => {
    /**
     *  If there are more elements which match specified selector, add elementIndex option.
     */
    return browser.executeScript(support.mouseDown, {elementSelector: selector,
      elementIndex: index});
}

mouseClick (complete example here)

const support = require('protractor-firefox-support');

module.exports.mouseClick = ({elemSelector, point, tgtIndex} = {}) => {
   const options = {};
   (elemSelector) ? options.selector = elemSelector : null;
   (point) ? options.point = point : null;
   (tgtIndex) ? options.elementIndex = tgtIndex : null;
   return browser.executeScript(support.mouseClick, options);
}

changeInputText(beta, complete example here)

const support = require('protractor-firefox-support');

module.exports.changeInputText = (selector, text, {elemIndex} = {}) => {
    /**
    *  If there are more elements which match specified selector, add elemIndex option.
    */
    const options = {};
    (elemIndex) ? options.elemIndex = elemIndex : null;
    return browser.executeScript(support.changeInputText, selector, text, options);
} 

dispatchEvent(complete example here)

const support = require('protractor-firefox-support');

module.exports.dispatchEvent = ({selector, tgtIndex, eventType, isMouseEvent, eventArguments} = {}) => {
    /**
    *  If there are more elements which match specified selector, add elementIndex option.
    */
    const options = {selector, eventType, isMouseEvent, eventArguments};
    (tgtIndex) ? options.elementIndex = tgtIndex : null;
    return browser.executeScript(support.dispatchEvent, options);
} 

Run tests

First of all you need to install necessary packages using next command:

npm run install-modules-tests

Then update webdriver-manager packages, start it and run tests:

npm run webdriver-update-windows
npm run webdriver-start-windows
npm run test-windows

for Windows or

npm run webdriver-update-linux
npm run webdriver-start-linux
npm run test-linux

for Linux/MacOS.