Starting ChromeDriver manually

Posted 4 months ago by bwrigley

I'm writing a little artisan command line tool that I need to browse my site with javascript execution.

Initially I was calling:


This started the driver fine running on port 9515 running as user vagrant (I'm using homestead)

But when I tried to use it I would get an error:

Failed to connect to localhost port 9515: Connection refused

If I started it manually on the command line:

$ ./vendor/laravel/dusk/bin/chromedriver-linux --port=9515

The driver started fine again running on port 9515 as user vagrant, but this time my tool runs fine.

I want to be able to start the ChromeDriver from within the tool. So I also tried:

$process = new \Symfony\Component\Process\Process('./vendor/laravel/dusk/bin/chromedriver-linux --port=9515');

Connection was refused again.

Any idea why this works when I start it from the command line but not within my artisan command

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.