TShrestha
TShrestha

Reputation: 1328

How to run laravel dusk in headfull mode from Sail and see the browser running the tests

I am playing around with Laravel sail and dusk for BDD. I have exactly followed Laravel sail documentation and I was able to run the tests in headless or headfull mode inside the sail container. But I want to see the test running by opening the browser. It would be easy if I was not using sail. Since I am using it, I am being unable to do so. Any instruction to achieve this ? Thanks in advance

Upvotes: 0

Views: 833

Answers (1)

Kidd Tang
Kidd Tang

Reputation: 2241

You can run the selenium standalone on your Windows Machine with Java installed.

  1. Download the Selenium v4 here into local dir (e.g. D:\Selenium)

  2. Download the Chrome Driver here into local dir (e.g. D:\Selenium)

  3. Add the local dir (e.g. D:\Selenium) in to PATH

  4. Open cmd and execute (replace your filename and your local host IP)

java -jar selenium-server-4.1.1.jar standalone --host 192.168.1.180
  1. In your .env.dusk.local,
APP_URL=http://localhost
DUSK_HEADLESS_DISABLED=true
DUSK_DRIVER_URL=http://192.168.1.180:4444/wd/hub

so, you can run the Dusk with browser opening.

Upvotes: 2

Related Questions