[英]Can't understand why I'm receiving an error with codecept
I'm writing a small test program where I want to reach login form and to fill it.我正在编写一个小型测试程序,我想在其中访问登录表单并填写它。 However, I receive an error.
但是,我收到一个错误。
Here's what I got in my code:这是我在我的代码中得到的:
<?php
class loginCest
{
public function frontpageWorks(AcceptanceTester $I)
{
$I->wantTo("Create login test");
$I->amOnPage('my link');
$I->see("join");
$I->fillField('.form-control', 'my_login');
}
}
I would try with a strict locator like:我会尝试使用严格的定位器,例如:
$I->fillField(['name' => 'userIdentifier'], 'my_login');
because codeceptions might find more than one element (and even a non-input) with the class .form-control
因为 codeceptions 可能会在类
.form-control
找到多个元素(甚至是非输入)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.