我有这段代码:
$I->wait(2);
$I->amOnPage('/ASTechOLE/exam-form-ng.php');
$I->wait(2);
$I->seeElement("//*[@id='oleWaitMessage']");
我的问题是,它给我一个错误,提示它找不到对象,但实际上在页面上。
我不确定(这就是为什么要问),但是我认为这可能与会议有关吗?在此之前,我的代码已登录,但是此部分实际上并未给我任何错误,并且按预期进行。编解码能否通过脚本使会话保持活动状态?
这是错误:
1) FirstCest: Login successfully
Test tests\acceptance\FirstCest.php:loginSuccessfully
Step See element "//*[@id='oleWaitMessage']"
Fail Element located either by name, CSS or XPath element with '//*[@id='oleWaitMessage']' was not found.
Scenario Steps:
12. $I->seeElement("//*[@id='oleWaitMessage']") at tests\acceptance\FirstCest.php:34
11. $I->amOnPage("/ASTechOLE/exam-form-ng.php") at tests\acceptance\FirstCest.php:30
10. $I->click("Proceed") at tests\acceptance\FirstCest.php:26
9. $I->click("Proceed") at tests\acceptance\FirstCest.php:24
8. $I->click("Proceed") at tests\acceptance\FirstCest.php:21
7. $I->click("Proceed") at tests\acceptance\FirstCest.php:19
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
谢谢。