0

I am using basic features with MinkZombieDriver. my node -v 5.2.0, npm -v 3.10.5, mink-zombie-driver v1.4.0 ..

behat.yml

default:

extensions:
     Behat\MinkExtension:
         base_url: 'https://example.com'
         javascript_session: zombie
         zombie:
             node_modules_path: '/home/ubuntu/node_modules'
         goutte: ~

paths: features: features bootstrap: %behat.paths.features%/bootstrap

I wrote simple feature and it is giving Behat\Mink\Exception\DriverException

@javascript

Scenario: View Products to assign store

Given I am on "/index.php"                                                                                          # FeatureContext::visit()
When I fill in "Username" with "hello"                                                                            # FeatureContext::fillField()
When I fill in "Password" with "123"                                                  # FeatureContext::fillField()
And I should see "Manage Your Accounts"                                                                             # FeatureContext::assertPageContainsText()
When I press "login_button"                                                                                         # FeatureContext::pressButton()
  Error while processing event 'click': "SyntaxError: Unexpected token u\n    at Object.parse (native)\n    

I searched in the web but not sure how to solve. I am still using the basic default features. I know the problem is with JSON parsing .. I am not sure what I am doing wrong? I am looking forward for any suggestions.. Thanks ..

Hasan
  • 1

1 Answers1

0

As is seems from my comment link you need to update zombie version to at least version 2.

Please note that you might have some compatibility issues that you will need to solve.

Check this answer also nodejs cannot find module 'zombie' with PHP mink

Community
  • 1
  • 1
lauda
  • 4,153
  • 2
  • 14
  • 28
  • I followed this package list while installing https://packagist.org/packages/behat/mink-zombie-driver and followed http://mink.behat.org/en/latest/drivers/zombie.html. I saw your suggested link also, i guess i missed the Zombie version.. I will look into it. – Hasan Aug 04 '16 at 13:30
  • Also I am using /home/ubuntu └─┬ zombie@4.2.1 – Hasan Aug 04 '16 at 14:13
  • How did you installed behat? do you have a composer.json that you can provide? How do you manage the dependencies? – lauda Aug 04 '16 at 14:28
  • I do have composer.json.. like "require": { "php": ">=5.3.3", "ext-mbstring": "*", "behat/gherkin":"~4.3", "behat/transliterator": "~1.0", "symfony/console":"~2.1", "symfony/config": "~2.3", "symfony/dependency-injection": "~2.1", "symfony/event-dispatcher":"~2.1", "symfony/translation":"~2.3", "symfony/yaml":"~2.1", "symfony/class-loader":"~2.1", "behat/mink": "*", "behat/mink-extension": "*", "behat/mink-selenium2-driver":"*", "behat/mink-zombie-driver":"*" }, "minimum-stability": "dev", "config": { "bin-dir": "bin/" } – Hasan Aug 04 '16 at 15:27