我正在为我的联系人编写测试(PHPUnit和Selenium),其中包括谷歌地图滑块。我正在测试中编写以下函数。
public function testContact() {
$this->open("/contact");
$this->assertTrue($this->isElementPresent("id=username"));
$this->assertTrue($this->isElementPresent("id=useremail"));
$this->assertTrue($this->isElementPresent("id=usermessage"));
$this->assertTrue($this->isElementPresent("css=input.submit_button"));
}
但是我收到错误消息 Timed out after 30000ms
并显示错误行$this->open ("/contact");
如何等待打开测试页面?
现在我可以这样等待$this-setTimeout(5000);