【问题标题】:No selenium sessionId in setUp method in phpunit testsphpunit 测试中的 setUp 方法中没有 selenium sessionId
【发布时间】:2013-09-19 18:16:34
【问题描述】:

尝试在测试用例的 setUp 方法中启动一些 selenium 调用,我收到如下错误:

Invalid response while accessing the Selenium Server at 'http://localhost:4444/selenium-server/driver/': ERROR Server Exception: sessionId should not be null; has this session been started yet?

看起来 phpunit 在 setUp 方法中没有提供 selenium sessionId(但奇怪的是,在同一个 setUp 中调用 open() 方法正在工作)。有什么方法可以说服 phpunit 提供该变量?

使用 phpunit 3.7.24 和 selenium 2.35.0

【问题讨论】:

    标签: selenium phpunit


    【解决方案1】:

    尝试添加 $this->start();在你的硒调用之前

    【讨论】:

      猜你喜欢
      • 2013-07-07
      • 2012-09-24
      • 2013-01-25
      • 1970-01-01
      • 2011-04-12
      • 2015-02-15
      • 2011-09-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多