{"id":22423379,"url":"https://github.com/prantlf/grunt-geckodriver","last_synced_at":"2025-03-27T05:40:54.965Z","repository":{"id":57255082,"uuid":"282747539","full_name":"prantlf/grunt-geckodriver","owner":"prantlf","description":"Controls Firefox using the WebDriver interface via geckodriver without Selenium.","archived":false,"fork":false,"pushed_at":"2023-05-05T22:44:43.000Z","size":332,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T12:06:02.158Z","etag":null,"topics":["browser","firefox","geckodriver","grunt-task","pruntplugin","testing","webdriver"],"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/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-26T23:00:56.000Z","updated_at":"2023-01-31T09:40:13.000Z","dependencies_parsed_at":"2024-12-05T18:10:58.794Z","dependency_job_id":"0ce42d2f-33b2-4e5d-a2a4-b9f494f2e46a","html_url":"https://github.com/prantlf/grunt-geckodriver","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":"0.11764705882352944","last_synced_commit":"e60c6781f6137527999f92a586f931a20a9ad938"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-geckodriver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-geckodriver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-geckodriver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgrunt-geckodriver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/grunt-geckodriver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791899,"owners_count":20672668,"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":["browser","firefox","geckodriver","grunt-task","pruntplugin","testing","webdriver"],"created_at":"2024-12-05T18:10:50.476Z","updated_at":"2025-03-27T05:40:54.945Z","avatar_url":"https://github.com/prantlf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-geckodriver\n\n[![Latest version](https://img.shields.io/npm/v/grunt-geckodriver)\n ![Dependency status](https://img.shields.io/librariesio/release/npm/grunt-geckodriver)\n](https://www.npmjs.com/package/grunt-geckodriver)\n[![Coverage](https://codecov.io/gh/prantlf/grunt-geckodriver/branch/master/graph/badge.svg)](https://codecov.io/gh/prantlf/grunt-geckodriver)\n[![codebeat badge](https://codebeat.co/badges/1777e780-ea70-4ebd-8f5a-df278c5761d6)](https://codebeat.co/projects/github-com-prantlf-grunt-geckodriver-master)\n\nControls Firefox using the WebDriver interface via geckodriver without Selenium.\n\nIf you use a modern test driver like [webdriverio], you will not need [Selenium] to run the tests, because the browser driver itself implements the [WebDriver] interface. This module provides a [Grunt] multi-task for installing, starting and stopping the [geckodriver] executable. You take care of installing Firefox.\n\nThis task, [grunt-chromedriver] and [grunt-safaridriver] can be used as a replacement for [grunt-selenium-standalone] for tasks like [grunt-html-dom-snapshot], to simplify the whole scenario by removing [Selenium] and [Java] from the requirements.\n\n## Installation\n\nYou need [node \u003e= 10][node], [npm] and [grunt \u003e= 1.0.0][Grunt] installed and\nyour project build managed by a [Gruntfile]. If you have not used Grunt before,\nbe sure to check out the [Getting Started] guide, as it explains how to create\na Gruntfile as well as install and use Grunt plugins.  Once you are familiar\nwith that process, you may install this plugin with this command:\n\n    npm install grunt-geckodriver --save-dev\n\n## Configuration\n\nAdd the `geckodriver` entry with one or more tasks to the options of the\n`grunt.initConfig` method in `Gruntfile.js`:\n\n```js\ngrunt.initConfig({\n  geckodriver: {\n    default: {}\n  }\n});\n```\n\nLoad the plugin:\n\n```javascript\ngrunt.loadNpmTasks('grunt-geckodriver');\n```\n\nAdd use the task to start and stop the browser driver before and after the tests:\n\n```js\ngrunt.registerTask('default', ['geckodriver:default:start', ..., 'geckodriver:default:stop']);\n```\n\n### Options\n\nDefault task options support the most usual usage scenario:\n\n```js\ngeckodriver: {\n  default: {\n    port: 4444,\n    findAvailablePort: false,\n    args: [],\n    force: false\n  }\n}\n```\n\n#### port\nType: `Number`\nDefault value: `4444`\n\nThe port for the `geckodriver` to listen to. If `findAvailablePort` is set to\n`true`, this port will be used to start the search for a free port with.\n\n### findAvailablePort\nType: `Boolean`\nDefault value: `false`\n\nIf set to `true`, the value of `port` will be used to start the search for a\nfree port with.\n\n### args\nType: `Array\u003cString\u003e`\nDefault value: `[]`\n\nCommand-line arguments for the `geckodriver` executable. Available ones:\n\n        --connect-existing  Connect to an existing Firefox instance\n        --jsdebugger        Attach browser toolbox debugger for Firefox\n    -v                      Log level verbosity (-v for debug and -vv for trace level)\n    -b, --binary \u003cBINARY\u003e   Path to the Firefox binary\n        --log \u003cLEVEL\u003e       Set Gecko log level [possible values: fatal, error,\n                            warn, info, config, debug, trace]\n        --marionette-host \u003cHOST\u003e  Host to use to connect to Gecko\n                                  [default: 127.0.0.1]\n        --marionette-port \u003cPORT\u003e  Port to use to connect to Gecko\n                                  [default: system-allocated port]\n        --host \u003cHOST\u003e  Host IP to use for WebDriver server [default: 127.0.0.1]\n    -p, --port \u003cPORT\u003e  Port to use for WebDriver server [default: 4444]\n\n### force\nType: `Boolean`\nDefault value: `false`\n\nIf set to `true`, it suppresses failures. Instead of making the Grunt fail,\nthe errors will be written only to the console.\n\n### Events\n\nIf `findAvailablePort` is set to `true`, the actual chosen port can be read by:\n\n```js\ngrunt.config.get(`geckodriver.\u003ctask-name\u003e.port`)\n```\n\nAs soon es the browser driver process starts listening, an event will be\ntriggered with the actually chosen port:\n\n```js\ngrunt.event.on(`geckodriver.\u003ctask-name\u003e.listening`, port =\u003e {...})\n```\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding\nstyle.  Add unit tests for any new or changed functionality. Lint and test\nyour code using Grunt.\n\n## License\n\nCopyright (c) 2020-2023 Ferdinand Prantl\n\nLicensed under the MIT license.\n\n[node]: https://nodejs.org\n[npm]: https://npmjs.org\n[Grunt]: https://gruntjs.com\n[Gruntfile]: https://gruntjs.com/sample-gruntfile\n[Getting Gtarted]: https://github.com/gruntjs/grunt/wiki/Getting-started\n[Selenium]: http://www.seleniumhq.org/download/\n[geckodriver]: https://github.com/giggio/node-geckodriver#readme\n[webdriverio]: http://webdriver.io/\n[Java]: https://java.com/en/download/\n[WebDriver]: https://www.w3.org/TR/webdriver/\n[grunt-html-dom-snapshot]: https://github.com/prantlf/grunt-html-dom-snapshot#readme\n[grunt-selenium-standalone]: https://github.com/zs-zs/grunt-selenium-standalone#readme\n[grunt-chromedriver]: https://github.com/prantlf/grunt-chromedriver#readme\n[grunt-safaridriver]: https://github.com/prantlf/grunt-safaridriver#readme\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgrunt-geckodriver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fgrunt-geckodriver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgrunt-geckodriver/lists"}