Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome Codeception-如何在chrome中运行验收测试_Google Chrome_Selenium_Codeception - Fatal编程技术网

Google chrome Codeception-如何在chrome中运行验收测试

Google chrome Codeception-如何在chrome中运行验收测试,google-chrome,selenium,codeception,Google Chrome,Selenium,Codeception,你能帮我在chrome上运行验收测试吗 1) 我的acceptance.suite.yml文件结构为 class_name: AcceptanceTester modules: enabled: - WebDriver: url: http://localhost:81/project browser: 'chrome' window_size: 1024x768

你能帮我在chrome上运行验收测试吗

1) 我的acceptance.suite.yml文件结构为

class_name: AcceptanceTester
modules:
    enabled:
        - WebDriver:
                url: http://localhost:81/project
                browser: 'chrome'
                window_size: 1024x768
                wait: 10
        - \Helper\Acceptance
2) 我将selenium-server-standalone-2.47.1.jar和chromedriver.exe保存在同一个文件夹中

我尝试使用命令
java-jar selenium-server-standalone-2.47.1.jar-Dwebdriver.chrome.driver=C:\stuff\sel\codeceptiontest\chromedriver.exe

3) 我收到一个错误
“错误:无法找到或加载主类=“

4) 这是运行我的文件的正确命令吗?

php codecept.phar运行测试/acceptance/loginCept.php--env chrome

您可以分别运行chrome Web驱动程序和Selenium服务器。它们很好用

  • 先安装chrome驱动程序,然后像这样运行
  • java-jar-selenium-server-standalone-2.52.0.jar-Dwebdriver.chrome.driver=/Users/ravis/Downloads/chromedriver

  • 在yml文件中:
  • 类别名称:验收测试仪 模块: 启用: -网络驱动程序: 网址: 浏览器:firefox -\Helper\Acceptance

    环境: 铬: 模块: 配置: 网络驱动程序: 浏览器:“chrome”

    它将覆盖firefox并为chrome设置环境。如果你愿意,你可以试试

  • run cmd:codecept运行验收登录文件--env chrome

  • 希望它对您有效。

    所以您的问题是无法启动selenium,对吗?是的。我不能启动selenium。我得到了上面指定的错误。我在yml中的设置正确吗?你能用Winzip打开jar吗。它可能是腐败的!