none
UI Automation for Windows Phone 8?

    Question

  • Hello,

    Can I create functional UI automated tests for Windows Phone 8? Is the Microsoft UI Automation API available for WP8? I can not find any documentation online about this?

    Thanks

    Tuesday, April 09, 2013 12:02 PM

All replies

  • Hi,

    There isn't a built in mechanism enabling you to programmatically mimic touch, tap, gestures, etc.

    You would need to build such simulation into your app, for example if you have a UI element's Tap event handler in your code, your UI tap simulator could directly call that event handler.

    Hope this helps,
    Mark


    Getting Started? Click here
    Blog: Windows Store & Phone Developer Solutions

    Wednesday, April 10, 2013 3:37 PM
  • Hi Mark,

    I had the same question - how can we write Functional UI tests for windows phone 8. I am using the Visual Studio 2012 Update 2 package which has the Windows Phone Unit Test App. I am able to connect to actual physical device, but i am not able to open a browser and perform any UI interaction or even getting the HTML DOM.

    The classes which i have tried to use are WebBrowser and WebBrowserTask. The later one has only one method Show() which successfully shows the internet explorer 10 with the desired URI but after that we cannot do anything. The WebBrowser class has the NavigateTo() method, which is not working for me.

    You said something about the event handler's for simulation, can you elaborate or show a simple example, it will be much easier to understand.

    Thanks in advance!

    Wednesday, August 28, 2013 12:58 PM
  • Hi,

    The following link describes button simulation. 

    http://stackoverflow.com/questions/16544730/ui-automation-in-windows-phone-8-application

    If trying to simulate input interaction within WebBrowser, I am not aware of a mechanism for this

    FYI there isn't an official UI automation framework for Windows Phone 8 apps.

    -Mark


    Getting Started? Click here
    Blog: Windows Store & Phone Developer Solutions

    Wednesday, August 28, 2013 3:48 PM
  • Hi Mark, 

    Thanks for looking into this. I have seen this example, but i think the problem here is it uses the MainPage.cs which i think is xaml.

    My requirement is - A User opens IE in Windows Phone 8, Goes to some site and then taps a button/link. So basically my test will launch the IE browser, then will open the URL and then will do a tap on some button or on screen.

    I know that the above scenario can be achieved in Windows 8 Desktop. But not able to figure out for Windows Phone 8.

    There should be a way to simulate this using Touch Libraries for Windows Phone 8. But i am struggling to find information on this.

    Also, i am not looking for Automation Framework for Windows Phone 8, but atleast the API which we can use for writing some tests.

    Wednesday, August 28, 2013 4:58 PM
  • you can try
    
    
    
    
       sikuli  , it's a solution. you can try
    Tuesday, September 10, 2013 4:41 AM