【问题标题】:How to wait before opening command at selenium tests phpunit?如何在 selenium 测试 phpunit 中打开命令之前等待?
【发布时间】:2013-10-07 07:43:44
【问题描述】:

我正在为我的联系人编写测试(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"); 处显示错误行 如何等待打开我的测试页?

【问题讨论】:

    标签: unit-testing testing selenium phpunit selenium-rc


    【解决方案1】:

    现在我可以这样等待$this-setTimeout(5000);

    【讨论】:

      猜你喜欢
      • 2017-08-11
      • 2018-08-28
      • 2017-09-18
      • 2010-12-17
      • 2018-04-03
      • 1970-01-01
      • 1970-01-01
      • 2020-01-22
      • 1970-01-01
      相关资源
      最近更新 更多