UWNetworksLab/node-chrome-runner

Name: node-chrome-runner

Owner: UW Networks Lab

Description: A small library to run Chrome

Created: 2015-03-02 19:56:01.0

Updated: 2017-11-14 06:17:59.0

Pushed: 2017-06-20 14:49:37.0

Homepage: null

Size: 17

Language: TypeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

node-chrome-runner

A small library to run Chrome.

Building the library
tup install  # install npm and third_party tools/libraries
 dist # build the library
Usage
ad with a relative path from the root of the node-chrome-runner repo...
chrome_runner = require('./build/dist/node-chrome-runner/chrome-runner');

ad if it is in your npm path (e.g. if it's in your package dependencies).
chrome_runner = require('node-chrome-runner');

art chrome; returns the child process as `c1.childProcess`...
c = chrome_runner.runChrome();

nsole log the path used to start chrome...
ole.log(c.path);

n chrome with a custom path, and argument to make chrome start
th user directory `tmp/foo` on Mac...
c = chrome_runner.runChrome({
rsions: [chrome_runner.chromePaths.canary],
gs:['--user-data-dir=tmp/foo'],
ocessOptions:{stdio: 'inherit'}


n chrome with a custom path, and argument to make chrome start
th user directory `tmp/foo` on Mac...
c = chrome_runner.runChrome({
th: '/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary',
gs:['--user-data-dir=tmp/foo'],
ocessOptions:{stdio: 'inherit'}


 use platform found version, but set the user-data dir...
c = chrome_runner.runChrome({
gs:['--user-data-dir=tmp/foo'],
ocessOptions:{stdio: 'inherit'}


nd a close signal to the started chrome.
ildProcess.kill();

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.