首页 > 解决方案 > wait() 调用 RuntimeException 错误代码接收

问题描述

为我的网站写一个小测试。但是,我的浏览器会降低我的测试速度,所以我需要一个短暂的“超时”,而一切都在那里加载。我尝试使用 .wait(secs),但收到错误消息:

[RuntimeException] 调用未定义的方法 AcceptanceTester::wait

这是我从代码中得到的一切:

class LoginCest
{

public function successFirstTest(AcceptanceTester $I)
{
$I->wantTo("Create test case for login");
        $I->amOnPage('link');
//        $I->wait(5); 
        $I->see("wow");
        $I->fillField("//input[@name='userIdentifier']", 'myEmail');
        $I->click("//button[contains(text(),'Prisijungti')]");
        $I->wait(10);
        $I->see("thEText");
}
}

.yml 文件:在此处输入图像描述

标签: phpseleniumautomationautomated-testscodeception

解决方案


推荐阅读