【问题标题】:Phpunit and Webdriver(Selenium2) - Can I run tests without selenium server like other languages?Phpunit 和 Webdriver(Selenium2) - 我可以像其他语言一样在没有 selenium 服务器的情况下运行测试吗?
【发布时间】:2014-04-05 09:02:53
【问题描述】:

我正在使用 phpunit/phpunit-selenium 进行 ui 功能测试。 我跟着这本小册子phpunit-selenium on github

到目前为止,我必须将 selenium 独立服务器作为 http 代理运行,而我想像 Java 一样直接操作浏览器。

Java 代码:

WebDriver diver = new FirefoxDriver(); 

但我没有在 phpunit-selenium 代码中找到一个名为 WebDriver 的类。

谁能给我看一个PHP代码示例,谢谢

【问题讨论】:

  • 是的,我在使用 Facebook WebDriver 时遇到了同样的问题。我想使用 Selenium WebDriver API,这意味着没有任何 Selenium 服务器(例如:localhost:4444)。您找到解决方案了吗?请分享给我!谢谢

标签: php selenium selenium-webdriver phpunit


【解决方案1】:

编辑:我误解了你的问题。 我想 facebook php-webdriver 可以帮助你。 搜索“facebook php webdriver example”之类的内容,您可以找到code examples

旧:

Test of Phpunit Selenium on Github有一些例子。

official manual中也有例子。

【讨论】:

    猜你喜欢
    • 2018-12-25
    • 2021-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-10
    • 1970-01-01
    • 2011-12-27
    • 1970-01-01
    相关资源
    最近更新 更多