{"id":25491519,"url":"https://github.com/igorsasovets/protractor-firefox-support","last_synced_at":"2026-03-11T10:02:57.128Z","repository":{"id":65476119,"uuid":"118097306","full_name":"IgorSasovets/protractor-firefox-support","owner":"IgorSasovets","description":"Custom implementation of Actions class functions for e2e testing with Protractor in Firefox","archived":false,"fork":false,"pushed_at":"2023-07-07T19:10:45.000Z","size":5088,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T00:06:06.396Z","etag":null,"topics":["actions","firefox","protractor"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IgorSasovets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null}},"created_at":"2018-01-19T08:17:12.000Z","updated_at":"2023-11-07T12:47:42.000Z","dependencies_parsed_at":"2023-01-25T06:15:29.234Z","dependency_job_id":"81aefcfd-ff97-4bbd-a19e-c9584c9b2058","html_url":"https://github.com/IgorSasovets/protractor-firefox-support","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":0.3508771929824561,"last_synced_commit":"553b6de8d3f1f49805bc54907c513d43089a776b"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorSasovets%2Fprotractor-firefox-support","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorSasovets%2Fprotractor-firefox-support/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorSasovets%2Fprotractor-firefox-support/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorSasovets%2Fprotractor-firefox-support/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IgorSasovets","download_url":"https://codeload.github.com/IgorSasovets/protractor-firefox-support/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131319,"owners_count":21052819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","firefox","protractor"],"created_at":"2025-02-18T22:17:50.810Z","updated_at":"2026-03-11T10:02:57.097Z","avatar_url":"https://github.com/IgorSasovets.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"protractor-firefox-support\n--------------------------\n\nThis is custom implementation of [Actions](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html) class functions\nfor e2e testing using Protractor framework in Firefox browser.\nIf you use it, ⭐️ it.\n\nInstallation\n------------\n\nYou can simply install it into your project using this command:\n\n```\nnpm install protractor-firefox-support --save\n```\n\nExamples of usage\n-----------------\n\nHere are examples of custom functions usage. Functions presented as separated\nmodules which can be imported in test files:\n\ndragAndDrop (complete example [here](https://github.com/IgorSasovets/protractor-firefox-support/blob/master/examples/exampleDND.js))\n------------\n\n```\nconst support = require('protractor-firefox-support');\n\nmodule.exports.performDnD = ({dragElmSelector = '.btn.btn-primary', dragElmIndex,\n    draggable = false} = {}) =\u003e {\n    const dropPoint = {x: 100, y: 100};\n    const options = {makeDraggable: draggable, dropLocation: dropPoint};\n\n    /**\n     *  You can define dragElement index if there are more than\n     *  one element with specified selector.\n     */\n\n    (dragElmIndex) ? options.dragElemIndex = dragElmIndex : null;\n\n    /**\n     *  Also you can pass selector instead of null, if you want to specify\n     *  drop element.\n     */\n    return browser.executeScript(support.dragAndDrop, dragElmSelector, null, options);\n}\n```\n\nopenContextMenu(rightMouseClick, complete example [here](https://github.com/IgorSasovets/protractor-firefox-support/blob/master/examples/exampleMouseActions.js))\n--------------------------------\n\n```\nconst support = require('protractor-firefox-support');\n\nmodule.exports.openElementContextMenu = ({selector, elemIndex} = {}) =\u003e {\n    const options = {location: {x: 100, y: 100}};\n\n    /**\n     *  If there are more elements which match specified selector, add elemIndex option.\n     *  Property 'location' defines screen coordinates where context menu will be opened.\n     */\n\n    (elemIndex) ? options.elemIndex = elemIndex : null;\n    return browser.executeScript(support.rightMouseBtnClick, selector, options);\n}\n```\n\nmouseUp (complete example [here](https://github.com/IgorSasovets/protractor-firefox-support/blob/master/examples/exampleMouseActions.js))\n-------\n\n```\nconst support = require('protractor-firefox-support');\n\nmodule.exports.mouseUp = (pointCoordinates = {x: 100, y: 100}) =\u003e {\n    return browser.executeScript(support.mouseUp, pointCoordinates);\n}\n```\n\nmouseMove (complete example [here](https://github.com/IgorSasovets/protractor-firefox-support/blob/master/examples/exampleMouseActions.js))\n---------\n\n```\nconst support = require('protractor-firefox-support');\n\nmodule.exports.mouseMove = (pointCoordinates = {x: 100, y: 100}) =\u003e {\n    return browser.executeScript(support.mouseMove, pointCoordinates);\n}\n```\n\nmouseDown (complete example [here](https://github.com/IgorSasovets/protractor-firefox-support/blob/master/examples/exampleMouseActions.js))\n---------\n\n```\nconst support = require('protractor-firefox-support');\n\nmodule.exports.mouseDown = ({selector, index} = {}) =\u003e {\n    /**\n     *  If there are more elements which match specified selector, add elementIndex option.\n     */\n    return browser.executeScript(support.mouseDown, {elementSelector: selector,\n      elementIndex: index});\n}\n```\n\nmouseClick (complete example [here](https://github.com/IgorSasovets/protractor-firefox-support/blob/master/examples/exampleMouseClick.js))\n----------\n\n```\nconst support = require('protractor-firefox-support');\n\nmodule.exports.mouseClick = ({elemSelector, point, tgtIndex} = {}) =\u003e {\n   const options = {};\n   (elemSelector) ? options.selector = elemSelector : null;\n   (point) ? options.point = point : null;\n   (tgtIndex) ? options.elementIndex = tgtIndex : null;\n   return browser.executeScript(support.mouseClick, options);\n}\n```\n\nchangeInputText(beta, complete example [here](https://github.com/IgorSasovets/protractor-firefox-support/blob/master/examples/exampleChangeText.js))\n---------------------\n\n```\nconst support = require('protractor-firefox-support');\n\nmodule.exports.changeInputText = (selector, text, {elemIndex} = {}) =\u003e {\n    /**\n    *  If there are more elements which match specified selector, add elemIndex option.\n    */\n    const options = {};\n    (elemIndex) ? options.elemIndex = elemIndex : null;\n    return browser.executeScript(support.changeInputText, selector, text, options);\n} \n```\n\ndispatchEvent(complete example [here](https://github.com/IgorSasovets/protractor-firefox-support/blob/master/examples/exampleDispatchEvent.js))\n---------------------\n\n```\nconst support = require('protractor-firefox-support');\n\nmodule.exports.dispatchEvent = ({selector, tgtIndex, eventType, isMouseEvent, eventArguments} = {}) =\u003e {\n    /**\n    *  If there are more elements which match specified selector, add elementIndex option.\n    */\n    const options = {selector, eventType, isMouseEvent, eventArguments};\n    (tgtIndex) ? options.elementIndex = tgtIndex : null;\n    return browser.executeScript(support.dispatchEvent, options);\n} \n```\n\nRun tests\n---------\n\nFirst of all you need to install necessary packages using next command:\n\n```\nnpm run install-modules-tests\n```\n\nThen update webdriver-manager packages, start it and run tests:\n\n```\nnpm run webdriver-update-windows\nnpm run webdriver-start-windows\nnpm run test-windows\n```\n\nfor Windows or\n\n```\nnpm run webdriver-update-linux\nnpm run webdriver-start-linux\nnpm run test-linux\n```\n\nfor Linux/MacOS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorsasovets%2Fprotractor-firefox-support","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorsasovets%2Fprotractor-firefox-support","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorsasovets%2Fprotractor-firefox-support/lists"}