Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can run multiple sessions of chromedriver #167

Open
garethmcc opened this issue Aug 29, 2018 · 1 comment
Open

Can run multiple sessions of chromedriver #167

garethmcc opened this issue Aug 29, 2018 · 1 comment

Comments

@garethmcc
Copy link

garethmcc commented Aug 29, 2018

Hi there,

I need to be able to use chromedriver to run two different sessions in parallel using the same chrome backend. Currently I seem to be getting a shared session between two parallel runs. Is there anyway to prevent that, such as passing some kind of profile name to seperate the two users as if they were different?

I start chromedriver with start() at the moment:

chromedriver.start([
      '--url-base=/wd/hub',
      '--port 9515'
    ])

Thanks in advance

@garethmcc garethmcc changed the title What args can be passed? Can run multiple sessions of chromedriver Aug 29, 2018
@giggio
Copy link
Owner

giggio commented Aug 29, 2018

Not yet, the code to start Chromedriver is really simple, see:

exports.start = function(args) {
var cp = require('child_process').spawn(exports.path, args);
cp.stdout.pipe(process.stdout);
cp.stderr.pipe(process.stderr);
exports.defaultInstance = cp;
return cp;
};

We can't change start method signature without breaking existing users, but we could add another method. How about a startNew method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants