【发布时间】:2016-06-05 14:40:16
【问题描述】:
我开始使用 Codeception 和 PhantomJS 进行验收测试。
这是我的acceptance.suite.yml
class_name: AcceptanceTester
modules:
enabled:
- WebDriver:
url: http://localhost/
browser: firefox
window_size: 1280x1024
wait: 2s
- \Helper\Acceptance
还有我的验收测试
$I = new AcceptanceTester($scenario);
$I->wantTo('Check that something');
$I->amOnPage('/');
$I->click('element that opens a bootstrap modal');
$I->see("Something on the modal");
我有一个以 ./phantomjs --webdriver=4444 开头的 PhantomJS 服务器,我使用 php codecept.phar run acceptance 启动我的测试。
但是,测试失败了
Step I see "Something on the modal"
Fail Failed asserting that /
[...]
--> contains "Something on the modal".
而_output 目录中的屏幕截图显示了模态和"Something on the modal"。
我做错了吗?
【问题讨论】:
标签: twitter-bootstrap phantomjs bootstrap-modal codeception