Problem getting started with Windows Phone Web Driver

May 12, 2014 at 9:05 PM
Hi - I am having difficulty getting started using the Windows Phone Web Driver. If anyone can help, I would be grateful!

My machine is running Windows 8.1 and Visual Studio 2012 with the Windows Phone SDK 8.0 installed. I have created a small test phone application, and have verified that I can deploy and run the application on a Windows emulator running on the same machine.

I downloaded and installed the Windows Phone Web Driver project (WindowsPhoneDriver-4-14-028-10) and have run the StartWindowsPhoneDriver.cmd. It reports the following output: http://169.254.189.114:8080/

In a separate Visual Studio project, I have written some test code that attempts to connect to the Windows Phone Web Driver, but when I run it, I get the following error: Unexpected error. Call could not be fullfield. JavaScript injection failed.

If I go to the UI of the emulator, I can verify that the WindowsPhoneDriver is listed as an installed application. I can ping the emulator at 169.254.189.114, but if I point my browser or try to telnet to 169.254.189.114:8080 then the connection is refused. So my first guess is that the WindowsPhoneDriver is not running, or is in some way blocked.

Can anyone help me work out what to do next? I should say that I am relatively new to Windows Phone (though am quite familiar with Visual Studio and C#) if that helps. Thanks in advance for any help. Martin
Coordinator
May 21, 2014 at 5:38 PM
I have faces similar issue. You can do one thing - get all source code and go to mainpage.xaml.cs and change function like

private void Browser_Loaded(object sender, RoutedEventArgs e)
    {

if AUTOSTART == false

        //Configurate();

endif

        BrowserState = new AutomatedWebBrowser(Dispatcher, this);

if AUTOSTART == false

        MiniHttpServer server = new MiniHttpServer(8080);

else

        MiniHttpServer server = new MiniHttpServer(8080);

endif

        RequestHandlers handlers = new RequestHandlers(BrowserState);
        server.RegisterHandlers(handlers);

        //Make sure that scripts are enabled inside the browser
        //It sometimes changes, dont't know why
        Browser.IsScriptEnabled = true;
         ShowIPaddresses();
    }
Hope it will resolve issue