laracasts / Behat-Laravel-Extension-Example-App

Quick example app to demonstrate setting up Behat with Mink and Laravel extension
23 stars 7 forks source link

Set "show_cmd" parameter in behat.yml to be able to open page in browser (ex.: "show_cmd: firefox %s") (RuntimeException) #2

Closed bizmate closed 4 years ago

bizmate commented 8 years ago

I am experiencing something strange in my experience. Usually behat works straight out the box with browserkit but I have run this example and if I run

Scenario:  Summary page displaying correctly                                                                                                              # features/example.feature:6
    Given I am on the homepage                                                                                                                                     # FeatureContext::iAmOnHomepage()
    Then show last response                                                                                                                                        # FeatureContext::showLastResponse()
      Set "show_cmd" parameter in behat.yml to be able to open page in browser (ex.: "show_cmd: firefox %s") (RuntimeException)
    Then I should see "Activity Summary"

Just to show it in bold the error displayed is \ Set "show_cmd" parameter in behat.yml to be able to open page in browser (ex.: "show_cmd: firefox %s") (RuntimeException)**

My behat.yml

default:
  extensions:
    Laracasts\Behat: ~
    #  env_path: .env.behat
    Behat\MinkExtension\ServiceContainer\MinkExtension:
      default_session: laravel
      base_url: 'http://localhost'
      laravel: ~ 

my .env.behat exists APP_ENV=acceptance

Any suggestions?

BaluErtl commented 4 years ago

Hi @bizmate,

This is the content of my behat.local.yaml file used on macOS system:

default:
  extensions:
    Behat\MinkExtension:
      base_url: 'http://localhost'
      sessions:
        default:
          goutte: ~
        browserChrome:
          chrome:
            api_url: 'http://chromium:9222'
#     show_cmd: '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome %s'
      show_cmd: '/Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser %s'
  formatters:
    tap: false
    pretty:
      output_path: 'php://stdout'

On *NIX systems you may want to try using 'firefox %s' as Behat's error message suggests.

bizmate commented 4 years ago

Thank you for the reply but I have not used this setup for a while.I am not even sure if I have ever solved the problem. closing the issue now