robertfausk / behat-panther-extension

Run your behat tests in a headless chrome/firefox - Symfony Panther extension for Behat
https://packagist.org/packages/robertfausk/behat-panther-extension
Other
30 stars 5 forks source link

Passing options doesn't seem to work #2

Closed dkarlovi closed 4 years ago

dkarlovi commented 4 years ago

When trying to pass options to Panther, it currently doesn't seem possible, I get

  [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]      
  Unrecognized option "options" under "testwork.panther". Available options are "".

Sample config

# behat.yaml.dist
default:
  extensions:
    Robertfausk\Behat\PantherExtension:
      options:
        browser: chrome
robertfausk commented 4 years ago

Hi @dkarlovi! You can now configure as follows. Hope this helps!

    # in behat.yml
        extensions:
            Robertfausk\Behat\PantherExtension: ~ # no configuration here
            Behat\MinkExtension:
               javascript_session: javascript_chrome
               sessions:
                   default:
                       panther: ~
                   javascript:
                       panther:
                           options: ~
                   javascript_chrome:
                       panther:
                           options:
                               browser: 'chrome'
                               webServerDir: '%paths.base%/public' # your custom public dir
                   javascript_firefox:
                       panther:
                           options:
                               browser: 'firefox'
robertfausk commented 4 years ago

Just released v1.0.1. Please comment this issue again if there are some problems.