Remote Screen Capture
Capture screenshots from url.
It uses Selenium(Chrome) under the hood.
Install
Using npm:
npm install remote-screen-capture
Using yarn:
yarn add remote-screen-capture
Usage
NOTE: If you using ES6+ just import statements
Promise-based:
// Or const RemoteScreenCapture = RemoteScreenCapture; // If you want to encoded dataRemoteScreenCapture; // If you want to save image locallyRemoteScreenCapture; // Synchronousconst saveFilePath = await RemoteScreenCapture;
Observable-based:
const RemoteScreenCapture = RemoteScreenCapture; // If you want to encoded dataRemoteScreenCapture; // If you want to save image locallyRemoteScreenCapture;
API
- take(URI: string, options?: OptionsInterface)
- options(width:number = 2880, height:number = 1800, savePath?: string)
- takeByElementSelector(URI: string, selectorName: string, options?: OptionsInterface)
- options(width:number = 2880, height:number = 1800, savePath?: string)
Where do I go for help?
If you need, open an issue.
Tests
npm test
runs the jest tests.
npm run-script coverage
runs the tests and reports code coverage.
Contributing
If you want to contribute to the project (awesome!!), just pull request.