mattisbusycom / php-webdriver-bindings

Automatically exported from code.google.com/p/php-webdriver-bindings
0 stars 0 forks source link

Only 'firefox' works #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. $this->webdriver = new WebDriver("localhost", 4444);
2. $this->webdriver->connect("htmlunit");

What is the expected output?
12:41:57.532 INFO - Executing: [new session: {javascriptEnabled=true, 
browserName=htmlunit, nativeEvents=false}] at URL: /session)
12:42:02.190 INFO - Done: /session

What do you see instead?
12:42:43.739 INFO - Executing: [new session: {javascriptEnabled=true, 
browserName=htmlunit, nativeEvents=false}] at URL: /session)
12:42:43.740 WARN - Exception thrown
java.util.concurrent.ExecutionException: 
org.openqa.selenium.WebDriverException: 
java.lang.reflect.InvocationTargetException
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.7', 
java.version: '1.6.0_24'
Driver info: driver.version: unknown
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:113)
    at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:91)
    at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:73)
    at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:87)
    at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:47)
    at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:153)
    at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:366)
    at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:348)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677)
    at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
    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:357)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: org.openqa.selenium.WebDriverException: 
java.lang.reflect.InvocationTargetException
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.7', 
java.version: '1.6.0_24'
Driver info: driver.version: unknown
    at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:97)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:81)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:151)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:87)
    ... 8 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.determineBrowserVersion(HtmlUnitDriver.java:184)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.<init>(HtmlUnitDriver.java:159)
    ... 13 more

What version of the product are you using? On what operating system?
selenium-server-standalone-2.0rc2
php-webdriver-bindings-0.5

I could work around the problem by editing WebDriver.php:33 FROM:
        $postargs = "{ desiredCapabilities: {  browserName: '" . $browserName . "', javascriptEnabled: true, nativeEvents: false } } ";
TO:
        $postargs = "{ desiredCapabilities: {  browserName: '" . $browserName . "', javascriptEnabled: true, nativeEvents: false, version: '' } } ";

Sincerely, 
 Reto

Original issue reported on code.google.com by retoonl...@gmail.com on 14 Jun 2011 at 10:46

GoogleCodeExporter commented 9 years ago
fixed in r23. Thanks Reto !

Original comment by lukasz.k...@gmail.com on 11 Jul 2011 at 12:00