http://www.scalatest.org/user_guide/using_seleniumを読んで、私はセレンとスカラテストのセレンDSLを統合しようとしています。
これが私が使用しているコードです:
class BlogSpec extends FlatSpec with ShouldMatchers with Chrome {
System.setProperty("webdriver.chrome.driver", "C:\\selenium-drivers\\chromedriver.exe");
val host = "http://www.google.com"
go to (host)
title should be ("Awesome Blog")
}
しかし、私はこのエラーを受け取ります:
* RUN ABORTED * java.lang.IllegalStateException:ドライバー実行可能ファイルへのパスは、webdriver.chrome.driverシステムプロパティで設定する必要があります。詳細については、 http://code.google.com/p/selenium/wiki/ChromeDriverを参照してください。最新バージョンは、 http: //code.google.com/p/chromedriver/downloads/list(com.google.common.base.Preconditions.checkState(Preconditions.java:176))(org.openqa.selenium)からダウンロードできます 。 remote.service.DriverService.findExecutable(DriverService.java:118)at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:61)at org.openqa.selenium.chrome.ChromeDriver。(ChromeDriver.java:107 )org.scalatest.selenium.Chrome$class。$init$(WebBrowser.scala:3756)
BlogSpec。(BlogSpec.scala:12)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor 27)java.lang.reflect.Constructor.newInstance(Constructor.java:513)で
..。
ドライバーはC:\\selenium-drivers\\chromedriver.exe
正しく設定されていますか、それとも上記のコードに別の問題がありますか?Chromeも起動していません