{"id":15199831,"url":"https://github.com/paypal/nemo-screenshot","last_synced_at":"2025-10-02T15:30:34.088Z","repository":{"id":17300102,"uuid":"20070567","full_name":"paypal/nemo-screenshot","owner":"paypal","description":"Plugin for Nemo testing framework for adapting selenium screenshot capabilities ","archived":true,"fork":false,"pushed_at":"2019-07-08T18:28:19.000Z","size":107,"stargazers_count":12,"open_issues_count":11,"forks_count":26,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-09-25T01:31:38.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paypal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-22T17:36:19.000Z","updated_at":"2024-02-24T02:58:35.000Z","dependencies_parsed_at":"2022-08-25T10:50:40.922Z","dependency_job_id":null,"html_url":"https://github.com/paypal/nemo-screenshot","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fnemo-screenshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fnemo-screenshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fnemo-screenshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fnemo-screenshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paypal","download_url":"https://codeload.github.com/paypal/nemo-screenshot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219875714,"owners_count":16554705,"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":[],"created_at":"2024-09-28T02:03:03.517Z","updated_at":"2025-10-02T15:30:28.807Z","avatar_url":"https://github.com/paypal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## nemo-screenshot\n\nNemo plugin which uses selenium-webdriver to take a screenshot\n\nRegister as \"screenshot\" (see below)\n\n[![Build Status](https://travis-ci.org/paypal/nemo-screenshot.svg?branch=master)](https://travis-ci.org/paypal/nemo-screenshot)\n\n### Requirements\n\n* Lists `nemo@^1.0.4` as a peerDependency\n\n### Usage\n\n* `npm install --save-dev nemo-screenshot@^v1.0.0`\n* Add this to your Nemo plugins configuration (adjust `arguments` according to where you want screenshots to be saved):\n\n```javascript\nplugins: {\n  screenshot: {\n    module: 'nemo-screenshot',\n    arguments: [reportPath {String}[, eventArray {Array}]]\n  },\n  /* other plugins */\n},\ndriver: {\n  // driver props\n}\n```\n\nThe plugin takes as argument the path to save the screenshots and an optional `eventsArray`. The events array can have one or more of the following elements.\n\n* `\"click\"`   - Takes a screenshot everytime the user performs a click\n* `\"exception\"` - Takes a screenshot when an exception occurs\n\n### API\n\n#### screenshot.snap\n\n* `@argument filename {String}` will save `\u003creport directory\u003e/filename.png` to the filesystem\n* `@returns {Promise}` resolves to a JSON object:\n\n```javascript\n{\n  \"imageName\": \"myImage.png\",\n  \"imagePath\": \"/path/to/image/\"\n  // this will be included optionally if Jenkins environment variables are present\n  // \"imageUrl\": \"jenkinsURL\",\n  // \"archivedImageUrl\": \"jenkinsURL\"\n}\n```\n\n#### screenshot.done\n\nThis is a convenience wrapper around `screenshot.snap` which can accept a callback, e.g. a mocha `done` method\n\n* `@argument filename {String}` will save `\u003creport directory\u003e/filename.png` to the filesystem\n* `@argument done {Function}` errback function to execute after screenshot is saved (or if there is an error saving screenshot)\n* `@argument err {Error} (optional)` error associated with screenshot. image information will be attached to this error's stack trace for reporting purposes\n\nUsage example:\n\n```javascript\n  it('will do some stuff then take a screenshot', function (done) {\n    nemo.somePlugin.someAction().then(function() {\n      // success!\n      nemo.screenshot.done('success', done);\n    }, function (err) {\n      // failure!\n      nemo.screenshot.done('success', done, err);\n    });\n  });\n```\n\n#### screenshot.setCurrentTestTitle\n\nIf set, the test title will be used as the screenshot filename when an exception occurs. Default screenshot filename is `ScreenShot_onException-[process_id]-[timestamp].png`, which is not easy to identify the failing test case.\n\n* `@argument testTitle {String}` current test title\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fnemo-screenshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaypal%2Fnemo-screenshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fnemo-screenshot/lists"}