2016-09-16 3 views
2

私のPHPセレンテストの実行に問題があります。私はちょうどUbuntuのOSに切り替えました。そして今、私はこの例外スタックをSELinuxのサーバーに追加しています。ドライバの実行可能ファイルへのパスは、webdriver.chrome.driverシステムプロパティ(php)によって設定する必要があります

Seleniumサーバー

08:58:49.965 INFO - Launching a standalone Selenium Server 
    08:58:49.986 INFO - Java: Oracle Corporation 25.101-b13 
    08:58:49.986 INFO - OS: Linux 4.4.0-36-generic amd64 
    08:58:49.996 INFO - v2.53.0, with Core v2.53.0. Built from revision 35ae25b 
    08:58:50.040 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: 
    registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX 
    08:58:50.041 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped: 
    registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX 
    08:58:50.041 INFO - Driver class not found: com.opera.core.systems.OperaDriver 
    08:58:50.041 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered 
    08:58:50.041 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped: 
    registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX 
    08:58:50.042 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver 
    08:58:50.042 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered 
    08:58:50.075 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub 
    08:58:50.075 INFO - Selenium Server is up and running 
    08:59:41.556 INFO - Executing: [new session: Capabilities [{browserName=chrome, platform=LINUX}]]) 
    08:59:41.566 INFO - Creating a new session for Capabilities [{browserName=chrome, platform=LINUX}] 
    08:59:41.573 WARN - Exception thrown 
    java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException 
    Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58' 
    System info: host: 'Keson', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-36-generic', java.version: '1.8.0_101' 
    Driver info: driver.version: unknown 
     at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
     at java.util.concurrent.FutureTask.get(FutureTask.java:192) 
     at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183) 
     at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119) 
     at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95) 
     at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124) 
     at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59) 
     at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1) 
     at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111) 
     at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79) 
     at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:204) 
     at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:166) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) 
     at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:132) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 
     at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) 
     at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680) 
     at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571) 
     at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526) 
     at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479) 
     at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920) 
     at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820) 
     at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986) 
     at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837) 
     at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243) 
     at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358) 
     at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537) 
    Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException 
    Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58' 
    System info: host: 'Keson', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-36-generic', java.version: '1.8.0_101' 
    Driver info: driver.version: unknown 
     at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113) 
     at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97) 
     at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60) 
     at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222) 
     at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
     at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
     at java.lang.Thread.run(Thread.java:745) 
    Caused by: java.lang.reflect.InvocationTargetException 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
     at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103) 
     ... 9 more 
    Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html 
     at com.google.common.base.Preconditions.checkState(Preconditions.java:199) 
     at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109) 
     at org.openqa.selenium.chrome.ChromeDriverService.access$0(ChromeDriverService.java:1) 
     at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137) 
     at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296) 
     at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88) 
     at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:138) 
     ... 14 more 
    08:59:41.576 WARN - Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html 

Chromdriver

Starting ChromeDriver (v2.9.248304) on port 9515 

と私はテスト

There was 1 error: 
UnknownServerException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html 

なぜこの問題がsudenlly登場を実行すると、これは誤りであるが実行されていますか?それを修正するには?追加情報が必要な場合は、私に知らせてください。あなたはcromedriverへのパスを置くべき-Dwebdriver.chrome.driver=

java -jar selenium-server-standalone-2.53.0.jar -Dwebdriver.chrome.driver=chromedriver.exe 

: は、あなたがこのようなクロムドライバオプションを設定する必要があり、事前

+0

このエラーは、どのようなコマンドの結果ですか? – lauda

答えて

6

でいただきありがとうございます。

+0

はいこれでした!ありがとうございます –

+4

私は瓶の後にその旗を使用した場合、鉱山は文句を言うでしょう。私は '-jar'の前に移動して解決しました。 – pkoch

+2

セレン3+では、 '-jar'オプションが最後のオプションである必要があります。 – lauda

関連する問題

 関連する問題