0

Grails 機能テストを実行するために Geb を使用しています。Chrome ドライバーを使用したいので、次の手順に従います: https://code.google.com/p/selenium/wiki/ChromeDriver

Google Chrome ドライバーを次の場所にインストールします。

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

私のマックで。

スイッチでテストを実行します

-Dwebdriver.chrome.driver="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"

日食から。

テストを実行すると、次のようになります。

Caused by: java.lang.IllegalStateException: The driver executable does not exist: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

スイッチを省略すると、次のようになります。

The path to the driver executable must be set by the webdriver.chrome.driver system property; 

引用符を省略すると、次のようになります。

java.lang.IllegalStateException: The driver executable does not exist: /Applications/Google\

引用をそのままにして、スラッシュの一部を省略した場合

/Applications/Google Chrome.app/Contents/MacOS/Google Chrome

私は得る:

 org.openqa.selenium.WebDriverException: chrome not reachable
  (Driver info: chromedriver=2.3,platform=Mac OS X 10.8.3 x86_64) (WARNING: The server did not provide any stacktrace information)

何か案は?

4

1 に答える 1

4

最初に、ドライバーブラウザーの両方をインストールする必要があります。次に、システム プロパティは、ブラウザではなくドライバを指す必要があります。webdriver.chrome.driver

于 2013-09-14T10:04:36.477 に答える