0

受け入れテストに 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 を実行: selenium-server-standalone-2.32.0.jar、PHP 5.3.15。失敗、ログに白い画面のスクリーンショット、状況が理解できない。

4

1 に答える 1

1

かなり基本的な問題。開始ページを指定する必要があります。いつも。コマンドの前にこの行を挿入します。

$I->amOnPage('/');
于 2013-05-12T17:58:08.953 に答える