【问题标题】:Codeception: Webdriver could not be found and loadedCodeception:无法找到并加载 Webdriver
【发布时间】:2015-05-26 10:45:43
【问题描述】:

在我的新工作中,我在 Windows 8 上使用 Selenium 运行 Codeception 时遇到了一些问题。

我收到此错误: [代码接收\异常\配置] 无法找到并加载 Webdriver。

我像上次在这篇文章中描述的那样手动启动了 Selenium 服务器:Web Driver Curl Exception

有人知道如何解决这个问题吗?

编辑 - 更多信息:

我正在运行 WAMP 服务器。 我在 httpd-vhostsconf 中配置了一个虚拟主机 我已验证 Selenium 服务器已启动。我尝试在服务器启动和不启动的情况下运行代码接收测试,在这两种情况下我都会得到完全相同的消息。

这是acceptance.suite.yml的内容:

modules:
  enabled:
    - Webdriver
    - AcceptanceHelper
  config:
    PhpBrowser:
        url: 'http://www.mywebsite.dev/'
    Webdriver:
        url: 'http://www.mywebsite.dev/'
        browser: firefox

【问题讨论】:

  • 您要在哪个浏览器上运行它?
  • 我正在尝试在 Firefox 上运行它
  • 请将 webdriver 模块部分也粘贴到您的套件 yml 文件中。

标签: selenium webdriver yaml codeception


【解决方案1】:

所以看起来问题是模块名称错误,应该是WebDriver而不是Webdriver

尝试运行:

modules:
  enabled:
    - WebDriver
    - AcceptanceHelper
  config:
    PhpBrowser:
        url: 'http://www.mywebsite.dev/'
    WebDriver:
        url: 'http://www.mywebsite.dev/'
        browser: firefox

它应该可以工作。

【讨论】:

  • 哇,只是一个愚蠢的错字,我真的没看到。谢谢,现在可以了。 (测试失败,但这是另一个问题:))
  • 干杯!愉快的测试
猜你喜欢
  • 1970-01-01
  • 2018-10-21
  • 2015-12-11
  • 1970-01-01
  • 2022-12-05
  • 2019-04-05
  • 2016-08-13
  • 1970-01-01
相关资源
最近更新 更多