WebDriverException: "Sorry, not implemented yet"

May 27, 2014 at 12:21 PM
This exception is returned whenever I try to run a test in the Windows Phone simulator. I am using the Java version of Selenium from Eclipse. Pinging the IP address of the simulator works fine.
Coordinator
May 30, 2014 at 7:07 PM
Can you please little more specific ? what you are trying to do and give some log?
Jun 2, 2014 at 11:15 AM
I am trying to start a RemoteWebDriver session on both the simulator and a device. The webdriver .xap is correctly installed by using DriverDeployTool. I am using the following code to start it:
public void setUp() {
            DesiredCapabilities capWP = DesiredCapabilities.internetExplorer();
            WebDriver driver = new RemoteWebDriver(new URL("http://192.168.1.133:8080/wd/hub"), capWP);
}
This returns the following error:
org.openqa.selenium.WebDriverException: Sorry, not implemented yet.
Command duration or timeout: 219 milliseconds
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
at contexts.InitializeOnPlatform.setUp(InitializeOnPlatform.java:158) //With line 158 being WebDriver driver = new RemoteWebDriver(new URL("http://192.168.1.133:8080/wd/hub"), capWP);
When removing "/wd/hub" from the URL, I instead get an UnreachableBrowserException. I should also note that other platforms work fine in this manner (Android and iOS).
Am I doing something wrong, or is it simply not possible to drive the Windows Phone Webdriver from Java?
Coordinator
Jun 2, 2014 at 5:49 PM
Edited Jun 2, 2014 at 5:51 PM
We dont support wd/hub string. try this
public void setUp() {
            DesiredCapabilities capWP = DesiredCapabilities.internetExplorer();
            WebDriver driver = new RemoteWebDriver(new URL("http://192.168.1.133:8080"), capWP);
}
Coordinator
Jun 2, 2014 at 8:30 PM
I didnt notice that you already tried that. Can you put debugger and see - are you getting exception while creating driver object or any other line of code.? Give some trace log for browser exception. You can also check event viewer log and see if no port is blocked.
Jun 3, 2014 at 11:56 AM
Edited Jun 3, 2014 at 11:56 AM
Here's the UnreachableBrowserException log:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
    at contexts.InitializeOnPlatform.setUp(InitializeOnPlatform.java:158)
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:178)
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
    at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
    at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(HttpCommandExecutor.java:319)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:298)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
I'm getting the error from line 158 in my setup class:
WebDriver driver = new RemoteWebDriver(new URL("http://192.168.1.133:8080"), capWP);
I'm confident that it's not a port blocking issue, as other webdriver instances start up fine, and I can ping the IP of the simulator or device.
Coordinator
Jun 3, 2014 at 6:34 PM
Looks like it blocking communication from Java n/w protocol. I will try to give a shot on java than update you.
Jun 6, 2014 at 7:25 AM
Edited Jun 6, 2014 at 7:38 AM
Hi,
I also met the same issue absolutely, and am looking forward to getting a fix from you as soon as possible.

Thanks for your effort.

PS: I am using selenium-java version 2.41.
Coordinator
Jun 6, 2014 at 11:24 PM
Edited Jun 6, 2014 at 11:28 PM
can you try this
> WebDriver driver = new RemoteWebDriver(new URL("http://10.80.26.76:8080/status"), capWP); 
Make sure /status append in url.
Coordinator
Jun 6, 2014 at 11:43 PM
Edited Jun 7, 2014 at 12:35 AM
On Initial investigation looks like its a problem with java socket communication. Need to look into selenium driver source code there is nothing wrong in windowsphone driver.
Coordinator
Jun 8, 2014 at 2:01 AM
Edited Jun 8, 2014 at 2:30 AM
Ok, So I checked java code in eclipse and i can able to to open URL in driver. No exception at all and perfectly working . Please use latest selenium standalone jar 2.42. version . I checked in real device so i am sure it will work in emulator too.

here is code snippet
package sampletest;
import java.io.Console;
import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.*;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

public class Test {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        DesiredCapabilities capWP = DesiredCapabilities.internetExplorer();
        try {
            WebDriver driver = new RemoteWebDriver(new URL("http://192.168.1.104:8080"), capWP);
            driver.navigate().to("http://codeplex.com");
            System.out.print("I can see its working and dont complain me");
        }
        catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

}
Thanks
Jun 12, 2014 at 12:42 PM
Edited Jun 12, 2014 at 12:50 PM
I've started an entirely new project in Eclipse and copied your code (with the exception of the device URL of course), but for some reason I get the following exception now:
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
System info: host: 'LBNL00358', ip: '192.168.1.112', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_21'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:153)
    at setup.WindowsPhone.startDriver(WindowsPhone.java:16)
    at setup.Setup.main(Setup.java:17)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.openqa.selenium.remote.JsonToBeanConverter.convertBean(JsonToBeanConverter.java:277)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:228)
    at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:42)
    at org.openqa.selenium.remote.http.JsonHttpResponseCodec.decode(JsonHttpResponseCodec.java:62)
    at org.openqa.selenium.remote.HttpCommandExecutor.createResponse(HttpCommandExecutor.java:301)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:178)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:572)
    ... 5 more
The "IllegalArgumentException" seems to be the culprit. Do you have any idea what could be causing this? The exact same code structure works fine on Android.

Edit: I should also note that this is using Selenium 2.42, so it should be exactly the same configuration as you have. I even reinstalled the Windows Phone SDK, just to be sure.
Jun 12, 2014 at 1:23 PM
Something just occurred to me. Are you sure you don't have a different build of the Webdriver app? It would help if you could share the exact same build as the one you're using.
Coordinator
Jun 15, 2014 at 2:49 AM
Alright Download this solution Driver(https://winphonewebdriver.codeplex.com/SourceControl/changeset/6211d47b037f325d5d02f747b440db5a8fbeed61) and then try. I hope this will resolve issue. You can download in latest source code.
Jun 16, 2014 at 9:48 AM
Great, that's it! I was still using the build from the Downloads section here (from November last year), but when I compiled the version you linked, it worked. Thanks!
Coordinator
Jun 16, 2014 at 6:34 PM
Cheers :) Let me know if you want more support during your implementation?
Aug 27, 2014 at 9:56 AM
Hello,

how can i work/deploy the latest code from which asthanarth is mentioned a link.

Please help me i am stuck in Exception ( org.openqa.selenium.remote.UnreachableBrowserException)

Thanks & Regards,
Paras Jain