2015-10-21 66 views
0
運行驗收試驗

任何人都可以幫我在Chrome運行驗收試驗Codeception - 如何在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)我得到一個錯誤"Error: Could not find or load main class ="

4)這是正確的命令來運行我的檔案?
php codecept.phar run tests/acceptance/loginCept.php --env chrome

+0

所以你的問題是,你不能啓動硒,對吧? – Naktibalda

+0

是的。我無法啓動硒。我收到了上面指定的錯誤。我的設置在接受yml是正確的嗎? – learn

+0

您是否可以使用Winzip打開罐子。它可能是腐敗的! –

回答

0

您可以單獨運行Chrome Web Driver和Selenium Server。他們工作得很好。

0
  1. 第一安裝鉻驅動並運行這樣

Java的罐子硒 - 服務器 - 獨立-2.52.0.jar -Dwebdriver.chrome.driver = /用戶/ ravis /下載/ chromedriver

  • 在YML文件:
  • CLASS_NAME:AcceptanceTester 模塊: 啓用: - 的webdriver: 網址:http://google.com 瀏覽器:Firefox - \輔助\驗收

    ENV: 鉻: 模塊: 配置: 的webdriver: 瀏覽器: '鉻'

    它將覆蓋firefox並將爲Chrome設置環境。你可以嘗試,如果你想。

  • 運行CMD:codecept運行驗收Loginfile --env鉻
  • 希望它爲你工作。