Code Monkey home page Code Monkey logo

winphonedriver's Introduction

Windows Phone Driver

Selenium Driver for automated testing of Windows Phone 8.1 Silverlight applications. For automated testing of Universal Apps see Windows Universal App Driver.

This repository hosts the code for the Windows Phone driver. You can use it for testing of native Windows Phone 8.1 applications. Currently it implements only limited subset of WebDriver JSON Wire Protocol and supports testing only via an emulator (Windows phone 8.1).

Driver contains of two parts: Outer and Inner. To run tests you will need to add WindowsPhoneDriver.InnerDriver to the app you want to test and start WindowsPhoneDriver.OuterDriver (Remote WebDriver to send Json Wire Protocol commands to).

Requirements to run tests using Windows Phone driver

  • Windows 8 or higher
  • Windows phone 8.1 SDK
  • You will also need Visual Studio 2013 with Update 2 or higher to build driver.

Usage

  1. Build solution

  2. In tested app project, add reference to WindowsPhoneDriver.InnerDriver

  3. In your app’s source code locate place where RootFrame is set (usually in PrepareApplication if you use Caliburn.Micro or App.xaml.cs for vanilla app) and add

    AutomationServer.Instance.InitializeAndStart(RootFrame);

    or (will include driver only for debug build)

    #if DEBUG
        AutomationServer.Instance.InitializeAndStart(RootFrame);
    #endif // DEBUG

    where RootFrame is visual root of application.

  4. Write your tests using you favorite language. In your test use app desired capability to set path to tested app's xap file (python example).

    ...
    self.driver = webdriver.Remote(
                command_executor = 'http://localhost:9999',
                desired_capabilities={
                    "app": r"C:\testApp.xap"
                })
    ...
    # find all Textblock elements
    blocks= self.driver.find_elements_by_tag_name("System.Windows.Controls.TextBlock")
  5. Start WindowsPhoneDriver.OuterDriver.exe

  6. Run your tests

winphonedriver's People

Contributors

nickab avatar nikita-afonasov avatar shiron avatar skyline-gleb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.