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',