- Windows application driver download
- Requirements and Support
- Usage
- Capabilities
- Setup
- Writing Tests for the Windows Driver
- Create Test Project
- Universal Windows Platform App Testing
- Classic Windows App Testing
- Starting a Session
- Windows application driver download
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio
- Latest commit
- Git stats
- Files
- README.md
- Тестирование UWP приложений с помощью Appium
- Установка WinAppDriver
- Создание проекта приложения для тестирования
- Создание проекта автоматизированного тестирования
- Популярные Hardware drivers загрузки
- Microsoft JDBC Driver 4.1 for SQL Server Microsoft JDBC Driver 4.1 for SQL Server —>
- Драйвер Microsoft JDBC 7.0 для SQL Server Драйвер Microsoft JDBC 7.0 для SQL Server —>
- Поставщик OLE DB для DB2 (Майкрософт) версии 6.0 Поставщик OLE DB для DB2 (Майкрософт) версии 6.0 —>
- Microsoft JDBC Driver 4.2 for SQL Server Microsoft JDBC Driver 4.2 for SQL Server —>
- Драйвер Microsoft JDBC 8.2 для SQL Server Драйвер Microsoft JDBC 8.2 для SQL Server —>
- Microsoft JDBC Driver 7.4 for SQL Server Microsoft JDBC Driver 7.4 for SQL Server —>
- Драйвер Microsoft JDBC 6.2 для SQL Server Драйвер Microsoft JDBC 6.2 для SQL Server —>
- Драйвер Microsoft JDBC 7.0 для SQL Server Драйвер Microsoft JDBC 7.0 для SQL Server —>
- Microsoft® ODBC Driver 13.1 for SQL Server® — Windows, Linux и macOS Microsoft® ODBC Driver 13.1 for SQL Server® — Windows, Linux и macOS —>
- Драйвер Microsoft® ODBC 11 для SQL Server® — Windows Драйвер Microsoft® ODBC 11 для SQL Server® — Windows —>
Windows application driver download
Appium has the ability to automate Windows PC Desktop apps. This driver relies on a project from Microsoft called WinAppDriver, which is an Appium-compatible WebDriver server for Windows Desktop apps (and more in the future). WinAppDriver is often abbreviated «WAD». WAD is bundled with Appium and does not need to be installed separately.
The Windows Driver supports testing of Universal Windows Platform (UWP) and Classic Windows (Win32) applications.
In addition to the WAD repo, development of the Appium driver takes place at the appium-windows-driver repo.
Requirements and Support
In addition to Appium’s general requirements:
- Windows PC with Windows 10 or up
- Ability to enter Administrator mode
Usage
The way to start a session using the Windows driver is to include the platformName capability in your new session request, with the value Windows . Also, ensure that you set the deviceName capability to WindowsPC as well. Of course, you must also include an appropriate app capability, at a minimum (see below).
Capabilities
The Windows driver supports a number of standard Appium capabilities. See below for how these should be used specifically with the Windows driver.
Setup
To test a Windows app, simply make sure you have turned developer mode on.
When running Appium (whether Appium Desktop or from the command line), ensure that you have started the app / cmd prompt as an administrator.
Writing Tests for the Windows Driver
You could begin by taking a look at some existing samples:
Java Samples
1. Open the sample folder as an existing project in a Java IDE such as IntelliJ. For example: CalculatorTest 2. In the Java IDE build and run the test
C# Samples
1. Pull and open CalculatorTest.sln under CalculatorTest 2. In Visual Studio 2015 with the test solution open build the test and select Test > Run > All Tests
Javascript/node Samples
If you want to write tests from scratch, you can choose any programming language or tools supported by Appium/Selenium to write your test scripts. In the example below, we will author the test script in C# using Microsoft Visual Studio 2015.
Create Test Project
- Open Microsoft Visual Studio 2015
- Create the test project and solution. I.e. select New Project > Templates > Visual C# > Test > Unit Test Project
- Once created, select Project > Manage NuGet Packages. > Browse and search for Appium.WebDriver
- Install the Appium.WebDriver NuGet packages for the test project
- Start writing your test (see sample code under [samples])
Universal Windows Platform App Testing
To test a UWP app, you can use any Selenium supported language and simply specify the Application Id for the app under test in the app capabilities entry. Below is an example of creating a test session for Windows Alarms & Clock app written in C#:
When testing the application you authored yourself, you can find the Application Id in the generated AppX\vs.appxrecipe file under RegisteredUserNmodeAppID node. E.g. c24c8163-548e-4b84-a466-530178fc0580_scyf5npe3hv32!App
Classic Windows App Testing
To test a classic Windows app, you can also use any Selenium supported language and specify the full executable path for the app under test in the app capabilities entry. Below is an example of creating a test session for Windows Notepad app:
Starting a Session
As mentioned above, you should additionally use these capabilities to ensure you are getting a Windows App automation session:
platformName : Windows deviceName : WindowsPC app : the appID of the Windows app for testing, or the path to the .exe file
Windows application driver download
Windows Application Driver
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Windows Application Driver
Windows Application Driver (WinAppDriver) is a service to support Selenium-like UI Test Automation on Windows Applications. This service supports testing Universal Windows Platform (UWP), Windows Forms (WinForms), Windows Presentation Foundation (WPF), and Classic Windows (Win32) apps on Windows 10 PCs.
Install & Run WinAppDriver
- Download Windows Application Driver installer from https://github.com/Microsoft/WinAppDriver/releases
- Run the installer on a Windows 10 machine where your application under test is installed and will be tested
- Enable Developer Mode in Windows settings
- Run WinAppDriver.exe from the installation directory (E.g. C:\Program Files (x86)\Windows Application Driver )
Windows Application Driver will then be running on the test machine listening to requests on the default IP address and port ( 127.0.0.1:4723 ). You can then run any of our Tests or Samples. WinAppDriver.exe can be configured to listen to a different IP address and port as follows:
Note: You must run WinAppDriver.exe as administrator to listen to a different IP address and port.
Write an Automation Script
Now that you’ve successfully installed WinAppDriver, you can get started with authoring your first automation script!
See here for a list of supported APIs by WinAppDriver. API support may differ from Appium and other counterparts.
Additional documentation on WinAppDriver and related topics can be found under /Docs/, such as the following:
This repository includes the following content:
- Samples — used to showcase various commands and operations such as opening applications, finding elements, clicking elements, typing keystrokes, reading texts, etc; and can be run against built-in Windows 10 applications such as Alarms & Clock, Calculator, and Notepad.
- Tests — used to verify the functionality of Windows Application Driver itself. The tests cover each API endpoints extensively and also against all basic UI control scenario, and demonstrate how to invoke certain command in C#. In addition, they show how to interact with some more complex UI elements such as DatePicker, SplitViewPane, Slider, etc.
- UI Recorder — standalone tool that aims to provide users a simpler way of creating automaton scripts by recording UI events performed by the user and generating XPath queries and C# code on the fly. Read more about it on our Wiki.
- Docs — subdirectory hosting WinAppDriver related documentation.
Vote on New Features
Add your feature request in issues or 👍 (+1) existing issues labeled as Enhancement
Тестирование UWP приложений с помощью Appium
На данный момент UWP приложения используют в качестве решения для тестирования через интерфейс Coded UI. Но если у вас приложение под несколько платформ, то в этом случае вам придется писать тесты под каждую платформу отдельно.
В 2016-ом году была анонсирована возможность тестирования UWP приложений с помощью Appium. Для этого был создан драйвер под названием Windows Application Driver (WinAppDriver).
Selenium, использующий WebDriver API, был создан для автоматического тестирования веб приложений. Appium это фактически Selenium для Apps.
Тестировать с помощью Appium и WinAppDriver можно не только UWP, но и Win32 приложения (о .NET почему-то не упоминают, но можно тестировать и их). Мне же, как обычно, UWP приложения наиболее интересны.
Установка WinAppDriver
После установки в директории C:\Program Files (x86)\Windows Application Driver будет расположен исполняемый файл WinAppDriver.exe, запустив который можно запустить сервис
Можно установить и Appium, который будет взаимодействовать с WinAppDriver, но WinAppDriver устанавливать нужно в любом случае. WinAppDriver должен устанавливаться вместе с Appium, но на момент написания статьи еще есть какие-то накладки, так что его приходится устанавливать отдельно. На всякий случай, давайте оставлю под спойлером как установить Appium на машину с Windows.
Для работы с Appium необходим Node.js версии 6.0 или выше и npm версии 3.5 и выше
Проверить версию Node.js можно с помощью команды консоли
node –v
Версию npm
npm –v
Скачать установщик Node.js можно с официального сайта
При установке устанавливается и npm
Если установленные версии выше чем минимально требуемые, то можно следующей командой запустить установку (командная строка должна быть запущена от имени администратора):
npm install –g appium
Теперь в командной строке можно запустить appium и получить следующее сообщение:
Создание проекта приложения для тестирования
Создадим простое UWP приложение, которое сразу же и протестируем. Пусть приложение совершает какую-нибудь простую операцию, например, возведение числа в квадрат. Исходный код демо приложения проще некуда.
В MainPage.xaml добавим:
А MainPage.xaml.cs только одно событие:
Из манифеста нам необходимо сохранить Package family name. Оно необходимо для написания теста.
Это же значение можно взять и из файла vs.appxrecipe, который находится в папке Debug/AppX. Значение содержится внутри RegisteredUserModeAppID.
Перед тем, как тестировать приложение, необходимо его развернуть. Вот такое приложение получилось:
С помощью утилиты inspect.exe, которая расположена в директории C:\Program Files (x86)\Windows Kits\10\bin\x86 можно определить наименования элементов для использования в тесте.
Запустив приложение, которое необходимо протестировать, можно или выбрать в дереве любой интересующий контрол или даже просто кликнуть на контрол в окне самого приложения. Получим приблизительно такую информацию:
Для поиска элемента обычно используются следующие значения: ClassName и Name. С драйвером IOs можно использовать поиск элемента по его AutomationId.
Создание проекта автоматизированного тестирования
В Visual Studio создаем проект типа Unit Test
В менеджере пакетов NuGet находим и устанавливаем Appium.WebDriver вместе с необходимыми для его работы зависимыми пакетами.
Для работы с UWP приложением может быть использован RemoteWebDriver, а может быть использован IOSDriver. Скорее всего после окончательного релиза появится какой-то третий драйвер именно под платформу Windows. Windows Namespace должен быть включен в NuGet пакет Appium .NET Driver.
Пишем код теста. В данном случае он может быть таким:
Если используется IOSDriver, то код инициализации изменяется на следующий:
Как вы можете заметить изменения минимальные. Код теста MakeOperation остается прежним.
Дополнительно можно (а если запускаете Appium, то даже нужно) указывать платформу и устройство:
Если вы запустили WinAppDriver, то строка URL:
Ну а если запустили Appium, то:
Запустим тест на выполнение. Можно таким образом:
И в случае, если все верно, получим:
Небольшая анимация автоматизированного процесса:
Напоследок, приведу стандартный пример работы с Win32 приложением:
Этот пример открывает блокнот и вводит текст. Для тестирования .NET приложения точно так же достаточно прописать путь к исполняемому файлу.
Популярные Hardware drivers загрузки
Microsoft JDBC Driver 4.1 for SQL Server Microsoft JDBC Driver 4.1 for SQL Server —>
Скачайте драйвер Microsoft JDBC 4.1 для SQL Server — драйвер JDBC типа 4, который обеспечивает обмен данными с базами данных через стандартные API-интерфейсы JDBC, доступные на платформе Java Enterprise Edition.
Драйвер Microsoft JDBC 7.0 для SQL Server Драйвер Microsoft JDBC 7.0 для SQL Server —>
Скачайте драйвер Microsoft JDBC 7.0 для SQL Server — драйвер JDBC типа 4, который обеспечивает обмен данными с базами данных через стандартные API-интерфейсы JDBC, доступные на платформе Java Enterprise Edition.
Поставщик OLE DB для DB2 (Майкрософт) версии 6.0 Поставщик OLE DB для DB2 (Майкрософт) версии 6.0 —>
Поставщик OLE DB для DB2 (Майкрософт) версии 6.0
Microsoft JDBC Driver 4.2 for SQL Server Microsoft JDBC Driver 4.2 for SQL Server —>
Скачайте драйвер Microsoft JDBC 4.2 для SQL Server — драйвер JDBC типа 4, который обеспечивает обмен данными с базами данных через стандартные API-интерфейсы JDBC, доступные на платформе Java Enterprise Edition.
Драйвер Microsoft JDBC 8.2 для SQL Server Драйвер Microsoft JDBC 8.2 для SQL Server —>
Скачайте драйвер Microsoft JDBC 8.2 для SQL Server — драйвер JDBC типа 4, который обеспечивает обмен данными с базами данных через стандартные API-интерфейсы JDBC, доступные на платформе Java Enterprise Edition.
Microsoft JDBC Driver 7.4 for SQL Server Microsoft JDBC Driver 7.4 for SQL Server —>
Скачайте драйвер Microsoft JDBC 7.4 для SQL Server — драйвер JDBC типа 4, который обеспечивает обмен данными с базами данных через стандартные API-интерфейсы JDBC, доступные на платформе Java Enterprise Edition.
Драйвер Microsoft JDBC 6.2 для SQL Server Драйвер Microsoft JDBC 6.2 для SQL Server —>
Скачайте драйвер Microsoft JDBC 6.2 для SQL Server — драйвер JDBC типа 4, который обеспечивает обмен данными с базами данных через стандартные API-интерфейсы JDBC, доступные на платформе Java Enterprise Edition.
Драйвер Microsoft JDBC 7.0 для SQL Server Драйвер Microsoft JDBC 7.0 для SQL Server —>
Скачайте драйвер Microsoft JDBC 7.0 для SQL Server — драйвер JDBC типа 4, который обеспечивает обмен данными с базами данных через стандартные API-интерфейсы JDBC, доступные на платформе Java Enterprise Edition.
Microsoft® ODBC Driver 13.1 for SQL Server® — Windows, Linux и macOS Microsoft® ODBC Driver 13.1 for SQL Server® — Windows, Linux и macOS —>
Microsoft ODBC Driver for SQL Server имеет встроенную поддержку подключения из Windows, Linux и macOS к Microsoft SQL Server и базам данных SQL Microsoft Azure.
Драйвер Microsoft® ODBC 11 для SQL Server® — Windows Драйвер Microsoft® ODBC 11 для SQL Server® — Windows —>
Драйвер Microsoft ODBC для SQL Server обеспечивает собственную возможность подключения к Microsoft SQL Server из Windows.