代码:[RuntimeException]调用未定义的方法AcceptanceTester :: wait [英] Codeception: [RuntimeException] Call to undefined method AcceptanceTester::wait

查看:139
本文介绍了代码:[RuntimeException]调用未定义的方法AcceptanceTester :: wait的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Codeception做我的第一个验收测试.

I'm making my first acceptance test with Codeception.

当我使用wait()waitForElement()运行测试时,收到以下消息:

When I run my test with wait() or waitForElement(), I get this message:

[RuntimeException] Call to undefined method AcceptanceTester::wait  

这是我的acceptance.yml

# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WebDriver or PhpBrowser.
# If you need both WebDriver and PHPBrowser tests - create a separate     suite.

class_name: WebGuy
modules:
enabled:
    - WebDriver
    - \Helper\Acceptance
config:
    WebDriver:
        url: 'http://rh.dev'
        browser: 'firefox'

这是我的测试:

$I = new AcceptanceTester($scenario);
$I->wantTo('Register my profile for the first time');
$I->amOnPage('/register');
$I->fillField('name', $person->name);
$I->wait(3); // secs
$I->fillField('lastName', $person->lastName);

我是从官方文档

我还确保执行:

vendor/bin/codecept build

出什么问题了?

推荐答案

class_name: WebGuy更改为class_name: AcceptanceTester

这篇关于代码:[RuntimeException]调用未定义的方法AcceptanceTester :: wait的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆