【发布时间】:2016-12-09 19:50:11
【问题描述】:
我正在使用 MinkZombieDriver 的基本功能。我的 节点 -v 5.2.0,npm -v 3.10.5,水貂僵尸驱动程序 v1.4.0 ..
behat.yml
默认值:
extensions:
Behat\MinkExtension:
base_url: 'https://example.com'
javascript_session: zombie
zombie:
node_modules_path: '/home/ubuntu/node_modules'
goutte: ~
路径: 特点:特点 引导程序:%behat.paths.features%/bootstrap
我写了一个简单的功能,它给出了 Behat\Mink\Exception\DriverException
@javascript
场景:查看产品以分配商店
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
我在网上搜索但不知道如何解决。我仍在使用基本的默认功能。我知道问题出在 JSON 解析上。我不确定我做错了什么?我期待着任何建议.. 谢谢..
【问题讨论】:
-
看看这是否有帮助github.com/Behat/MinkExtension/issues/219应该有帮助。