我正在尝试使用 codeception 进行验收测试。我决定将它与 Selenium2 一起使用。启动环境:
验收.suite.yml:
class_name: WebGuy
modules:
enabled:
- Selenium2
- WebHelper
config:
Selenium2:
url: 'http://nemo.dev'
browser: firefox
delay: 1000
测试:
<?php
$I = new WebGuy($scenario);
$I->wantTo('see text');
$I->amGoingTo('/');
$I->see('text');
构建并运行 Firefox 启动后,显示空白页面并退出。
在控制台中:
1) Couldn't see text in SigninCept.php
Guy couldn't see "text": 'text' in .
Failed asserting that response contains "text". Response was saved to 'log' directory.
Scenario Steps:
2. I see "text"
1. I am going to /
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
运行 Mac OS X 10.8.3,硒:selenium-server-standalone-2.32.0.jar,PHP 5.3.15。失败,日志中的白屏截图,不了解情况。