Php behat minkextension selenium-找不到扩展名文件或类
希望有人能帮上忙-我用的是Windows,不是Mac。自学,所以不要问专家。Php behat minkextension selenium-找不到扩展名文件或类,php,selenium,behat,mink,Php,Selenium,Behat,Mink,希望有人能帮上忙-我用的是Windows,不是Mac。自学,所以不要问专家。 安装了所有东西,我可以使用php计算器测试.feature文件(如果我按50,然后等等)。 我想用它来测试网站的乐趣。 我的文件夹结构是: C:\Behat\features C:\Behat\vendor(所有内容都下载到其中) C:\Behat\Behat.yml C:\Behat\composer.json和.lock Composer.json包含 "require": { "php":
安装了所有东西,我可以使用php计算器测试.feature文件(如果我按50,然后等等)。
我想用它来测试网站的乐趣。
我的文件夹结构是:
C:\Behat\features
C:\Behat\vendor(所有内容都下载到其中)
C:\Behat\Behat.yml
C:\Behat\composer.json和.lock
Composer.json包含
"require": {
"php": ">=5.3.2",
"behat/behat": "~3.0,>=3.0.5",
"behat/mink": "~1.5",
"symfony/config": "~2.2",
"behat/mink-extension": "*",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium2-driver": "*"
},
"require-dev": {
"phpspec/phpspec": "~2.0",
"behat/mink-goutte-driver": "~1.1@dev"
},
"autoload": {
"psr-0": { "Behat\\MinkExtension": "src/" }
},
behat.yml文件包含(一次尝试)
又一次尝试
default:
suites:
my_suite:
contexts:
- FeatureContext
- Behat\MinkExtension\Context\MinkContext
extensions:
Behat\MinkExtension:
base_url: 'http://example.com'
sessions:
default:
goutte: ~
在FeatureContext.php文件中添加了“使用Behat\MinkExtension\Context\MinkContext;”还将C:\Behat\vendor\bin添加到我的路径中 但我总是在运行behat时收到此消息
[Behat\Testwork\ServiceContainer\Exception\ExtensionInitializationException]
`Behat\MinkExtension` extension file or class could not be located.
有人有什么建议吗
帮助他人但不为我修复的网站自动加载设置表明,在
C:\Behat\src
中可以找到貂皮扩展源,但情况可能并非如此。这是作曲家创作的吗?@b263你这个超级巨星!它不是由composer生成的,我认为它是一个示例。我将其更改为`“自动加载”:{“psr-0”:{“Behat\\MinkExtension”:“vendor/Behat/mink extension/src/“}}},`现在它正在按预期工作!
[Behat\Testwork\ServiceContainer\Exception\ExtensionInitializationException]
`Behat\MinkExtension` extension file or class could not be located.