From 579fcfc3bdf292f859006fb10e7f5af52d64cee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Vicente?= Date: Sun, 5 Mar 2017 09:28:50 +0000 Subject: [PATCH] feat: add support for custom user-data-dir in Chromium Fixes #89 --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0718189..a79e8b1 100644 --- a/index.js +++ b/index.js @@ -71,6 +71,7 @@ var ChromiumBrowser = function (baseBrowserDecorator, args) { baseBrowserDecorator(this) var flags = args.flags || [] + var userDataDir = args.chromeDataDir || this._tempDir this._getOptions = function (url) { // Chromium CLI options @@ -82,7 +83,7 @@ var ChromiumBrowser = function (baseBrowserDecorator, args) { }) return [ - '--user-data-dir=' + this._tempDir, + '--user-data-dir=' + userDataDir, '--no-default-browser-check', '--no-first-run', '--disable-default-apps',