Giter VIP home page Giter VIP logo

winappdriver's Introduction

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

  1. Download Windows Application Driver installer from https://github.com/Microsoft/WinAppDriver/releases
  2. Run the installer on a Windows 10 machine where your application under test is installed and will be tested
  3. Enable Developer Mode in Windows settings
  4. 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:

WinAppDriver.exe 4727
WinAppDriver.exe 10.0.0.10 4725
WinAppDriver.exe 10.0.0.10 4723/wd/hub

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!

Supported APIs

See here for a list of supported APIs by WinAppDriver. API support may differ from Appium and other counterparts.

FAQ & Documentation

Additional documentation on WinAppDriver and related topics can be found under /Docs/, such as the following:

Repository Content

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

winappdriver's People

Contributors

andonyns avatar cltshivash avatar cmaneu avatar dhimalo avatar dhowett avatar dquist avatar dzmitrykamarou avatar fforjan avatar hassanuz avatar ianceicys avatar janemareth avatar jsbakker avatar junlinzhu avatar kylinmb avatar licanhua avatar miniksa avatar paulcam206 avatar shankarkc avatar shweaver-msft avatar sierzput avatar smilinrobin avatar stoneman avatar timheuer avatar timotiusmargo avatar trashbat avatar wongsi85 avatar yodurr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

winappdriver's Issues

Unable to return to next line

I’m experiencing issues with text fields and creating a new line by either \n, or sending an action to press the enter key. When the enter key is pressed it’s creating a symbol (e.g. []) instead of returning to the next line.

Ruby:
win.find_element(:name, "textField").send_keys "ENTER TEXT AND GOTO NEW LINE\n"
or
win.find_element(:name, "textField").send_keys [:return]

Snapshot captures about 1/4 of application window

Hi,

Background: Running application.
Foreground: Snapshot (via Selenium).

capture

Script:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("app", "Microsoft.Windows.Photos_8wekyb3d8bbwe!App");

        rwd = new RemoteWebDriver(new URL("http://XXX.30.201.YYY:4723"), capabilities);
        WebDriver augmentedDriver = new Augmenter().augment(rwd);
        File screenshot = ((TakesScreenshot)augmentedDriver).getScreenshotAs(OutputType.FILE);

        //Close the browser
        Path destPath = Paths.get("C:\\Root\\selenium\\reports\\").resolve("Windows.Photos.png");
        com.google.common.io.Files.copy(screenshot, destPath.toFile());

In addition, although selenium script has already brought snapshot, WinAppDriver continues to print a lot of data on console and that takes about 2.5 minutes. Eventually, it finishes the command.

capture2

Thanks in advance,
Denys

Screenshot has a little bit of background attached

Hey, I'm using Appium with WinAppDriver with Visual Studio 2015 Community Edition to Test a UWP application.

I was doing some screenshots for documentation with

var img = mySession.GetScreenshot();
img.SaveAsFile("D:\\myfile.jpg", ImageFormat.Png);

and after opening the file, there was some parts of the background (maybe 3-10 pixels) over the App border in the image. I don't know, whether this is related to Appium or WinAppDriver, but is there a way to fix this?
A workaround might be to crop the image myself with an Image Tool, like IrfanView, but I would like to avoid that.

self.w3c = "specificationLevel" in self.capabilities ;TypeError: argument of type 'NoneType' is not iterable

import unittest
from appium import webdriver

desired_caps = {
'platformName': 'WindowsModern',
'app': 'Microsoft.WindowsCalculator_8wekyb3d8bbwe!App',
}
print desired_caps
driver = webdriver.Remote('http://127.0.0.1:4723', desired_caps)
print driver
print driver.find_element_by_name('One')


Tried the WinAppDriver with python and getting the below error from appium driver

in
driver = webdriver.Remote('http://127.0.0.1:4723', desired_caps)
File "C:\Python27\lib\site-packages\appium\webdriver\webdriver.py", line 36, in init
super(WebDriver, self).init(command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 91, in init
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 181, in start_session
self.w3c = "specificationLevel" in self.capabilities
TypeError: argument of type 'NoneType' is not iterable


In webdriver.py
In the line
self.capabilities = response['value']
response['value'] seems to be null.

Did I miss anything in the python script ?

POST /session/:sessionId/element/:id/value only sets the 1st character of a string

Example (pseudo-javascript):

// initialize driver
driver.setValue('//Edit', '[email protected]');
// test continues

The server receives a request like so:

POST /session/213C7E07-0C10-4398-9C33-18480AC60E4E/element/42.13372574.2.465/value HTTP/1.1
Accept: application/json
Connection: keep-alive
Content-Length: 99
Content-Type: application/json; charset=UTF-8
Host: 127.0.0.1:4723
User-Agent: webdriverio/webdriverio/4.0.8

{"value":["m","y","u","s","e","r","n","a","m","e","@","o","u","t","l","o","o","k",".","c","o","m"]}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"213C7E07-0C10-4398-9C33-18480AC60E4E","status":0}

Command keys is not recognized

When trying to Press a key using Keyboard.PressKey(string KeyToPress) method I get a message that keys command is not recognized.

public void SendTABKeys()
{
AppSession.Keyboard.PressKey("Tab");
}

POST /session/E492B7B2-5F16-40F3-AB68-9F3B3046A32A/keys HTTP/1.1
Accept: application/json, image/png
Content-Length: 23
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"value":["T","a","b"]}

WinAppDriver::CommandHandler::Session::HandleCommandAsMidPoint - Command keys is not recognized

HTTP/1.1 404 Not Found
Content-Length: 141
Content-Type: application/json

{"status":9,"value":{"error":"unknown command","message":"Command not recognized: POST: /session/E492B7B2-5F16-40F3-AB68-9F3B3046A32A/keys"}}

WinAppDriver fails to create first new session for new application.

Hi,

I run WinAppDriver on Surface with Windows 10 as **Administrator.
The below selenium script fails on creating RemoteWebDriver with error message:

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (WARNING: The server did not provide any stacktrace information)

Selenium Java Script

    RemoteWebDriver rwd = null;
    try {
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
        rwd = new RemoteWebDriver(new URL("http://YYY.30.201.ZZZ:80"), capabilities);
        rwd.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
        rwd.findElementByName("Clear").click();
        rwd.findElementByName("Seven").click();
        WebElement result = rwd.findElementByName("Display is  7 ");
    }catch(Exception e){
        e.printStackTrace();
    } finally {
        if(rwd != null){
            rwd.quit();
        }
   }

On server side, WinAppDriver launches Calculator application successfully.

There is a message on console '{"status":33,"value":{"message":"A new session could not be created."}}'

If I close the Calculator application and run the Selenium script again, then the scenario will fail again.
If I don't close the Calculator application and run the Selenium script again, then the scenario will success and WinAppDriver will close the Calculator by itself and all next runs will success too.
If I run a new scenario for different application ("Microsoft.WindowsAlarms_8wekyb3d8bbwe!App"), the above scenario will be repeated.

How to get the selenium script runs successfully on the first time?
:)

Thanks in advance,
Denys

Dynamically generated Button doesn't respond to click command

I am developing an app and am trying to incorporate automated ui testing using this awesome(!) driver. In the app is a list of other devices related to the user's account in the app which is dynamically generated from a list pulled from our server, using a web call and displayed using an ItemsControl/DataTemplate. Part of the list is a button that has a dynamic name (based on id of device in our server) that will perform an action on the corresponding device.
I am using the iOS appium library to send these commands, and clicking other (static) buttons work, but for some reason, trying to click this particular button does not work. The windows app driver acts as though it works, but the code behind the button does not execute. Of course the button works if I click it, so I'm thinking it has something to do with being dynamically generated.
The Windows App Driver does successfully find the button, and it does successfully describe to me some of its attributes, but for some reason sending the click command does nothing.

It finds the button:
image

Definitely the correct button:
image

Clicking/Tapping do nothing, although report as successful:
image

Again, it works if a human clicks it, but not if it goes through the windows app driver. And I have checked that the size isn't 0 and that it is enabled/displayed etc, all of which the win app driver correctly reports. It is just the click/tap action that seems not to work.

It is impossible to change a default port without providing IP Address

I want to change default server port without providing IP Address.
It is impossible to do.

Expected: WinAppDriver -port 80.
Actual: WinAppDriver 172.52.22.161 80

The issue is IP is not static and after restart may be changed, today in order to change port I should write a script that extract IP address.

Impossible to create connection via Java-client

I've created a class based on Java Selenium binding:
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.setCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
appCapabilities.setPlatform(Platform..WINDOWS);
RemoteWebDriver CalculatorSession = new RemoteWebDriver(new URL("http://127.0.0.1:4723"), appCapabilities);

During calling startSession(...) execute(...) method returns response with 'sessionID' but 'value' property is null.

Thanks for assistance.

Can't expand/open a combo box for UWP application

I have tried clicking, sending the enter key, space key and down arrow key to combo box through the driver and nothing seems to have any effect on it. Am I missing something?

protected const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723";
protected static IOSDriver<IOSElement> HandheldSession;

// Launch the  App
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("app", "89aadf91-0d88-4eaf-8b5c-a81603002896_4s90vd6skb15c!App");`           
HandheldSession = new IOSDriver<IOSElement>(new Uri(WindowsApplicationDriverUrl), appCapabilities);
Assert.IsNotNull(HandheldSession);
HandheldSession.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(2));


var comboBox = HandheldSession.FindElementByName("Items");

// assert the report combo box is displayed
Assert.IsTrue(comboBox.Displayed);

// build list of expected report names
List<string> expectedReportList = new List<string>();
foreach (var reportName in table.Rows)
{
        expectedReportList.Add(reportName["Name"]);
}

// open combo box to check expected for expected items
//comboBox.Click();
comboBox.SendKeys(Keys.Enter);

Does WinAppDriver supports WPF applications yet?

I am trying to automate a WPF application using this awesome tool. Latest release 0.4, downloaded from GitHub.

During create session - server just do not respond/or take forever to respond (>20 minutes). Application indicated as the capability "app" launched fine.

Console looks like below:

image

Any ideas which can help here?

SendKeys special characters

The release notes for 0.4-beta include "SendKeys functionality enabled for special characters". I have tried simulating the enter key using hello\n but this does not appear to work. Is this a bug or is there a different syntax for enter? What other characters are supported?

WinAppDriver failed to up

I have configured WinAppDriver to listen on external IP (static), sometimes after restart it fails to up with following error. The WinAppDriver is configured to start on log on.

image

Thanks in advance

WinAppDriver could not run Application

Suddenly, WinAppDrive could not run Application.
On WinAppDriver console, there is message 'HTTP 404 error'

Need your help.

Thanks in advance

image

Code
` DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");

RemoteWebDriver rwd = new RemoteWebDriver(new URL("http://172.30.201.161:80/wd"), capabilities);`

Exception
com.perfectomobile.web.selenium.executor.surface.CalculatorSurface
org.openqa.selenium.UnsupportedCommandException: Build info: version: '2.48.0', revision: 'b7b081a', time: '2015-10-07 15:48:56' System info: host: 'ws-denyss-7', ip: '172.30.200.115', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_79' Driver info: org.openqa.selenium.remote.RemoteWebDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)

Unable to connect Remotely. Default listening IP is always 127.0.0.1

Machine: Windows 10 64-bit

As per the documentation:
"Default listening address is 127.0.0.1:4723. You can configure WinAppDriver.exe to listen to a different IP address and port if you run it as administrator."

I tried to run in Admin Mode, but still The default listening IP and Port is showing as 127.0.0.1:4723
I am unable to connect it Remotely.

WinAppDriver fails to create new session on Surface. Got 404 error.

Hi,

I have installed WinAppDriver on a brand-new Surface.

If I run the driver with localhost and run a remote selenium client then /session fails on 404 error.
If I run the driver with ip address and run a remote selenium client then /session succeed.

Looks like driver checks IP Address from client request to what was passed to driver from command line. It is very strange behavior.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Not Found</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY>**<h2>Not Found</h2>
<hr><p>HTTP Error 404. The requested resource is not found.</p>**
</BODY></HTML>

session

Unable to launch app using Ruby bindings

Unable to start a new session using the selenium ruby bindings. It appears the selenium server is expecting capabilities returned back from the WinAppDriver server. Though, I’m surprised other bindings are not encountering this issue too. I've tried various combinations of the capabilities but to no avail. See below for more details.

  • To work around this issue, I rescue the .dup call with an empty hash.

#WinAppDriver and Windows
require 'selenium-webdriver'
caps = { platformName: "ANDROID", deviceName: "android", platform: “Windows", app: "Microsoft.App_8wekyb3d8bbwe!App” }
win = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:4723", :desired_capabilities => caps )
irb(main):004:0> win = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:4723", :desired_capabilities => caps )

WinAppDriver successfully launches app and a session is created…

POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Connection: close
Content-Length: 115
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: Ruby

{"desiredCapabilities":{"platform":"Windows","app":"Microsoft.App_8wekyb3d8bbwe!App"}}
SessionManager - Creating session for Microsoft.App_8wekyb3d8bbwe!App
SessionManager - WinAppDriver succeeded loading MitaBroker
SessionManager - Application launched
SessionManager - Session successfully created: A13C9DFE-6E0A-4DFF-988B-EBD0425A8C2B

HTTP/1.1 200 OK
Content-Length: 122
Content-Type: application/json

{"capabilities":{"app":"Microsoft.App_8wekyb3d8bbwe!App"},"sessionId":"A13C9DFE-6E0A-4DFF-988B-EBD0425A8C2B","status":0}

However, the ruby bindings then throw the error below after the session is created.

TypeError: can't dup NilClass
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/capabilities.rb:162:in dup' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/capabilities.rb:162:injson_create'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/bridge.rb:126:in create_session' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/bridge.rb:87:ininitialize'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/common/driver.rb:59:in new' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/common/driver.rb:59:infor'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver.rb:84:in for' from (irb):4 from C:/tools/ruby22/bin/irb:11:in

'

So I wanted to see what the differences where with the Appium server. Looks like the Appium server returns the below capabilities back to the selenium server (in bold below) on , which I believe the WinAppDriver server is not doing, so it fails on this method.

*#Appium and Android *
require 'selenium-webdriver
caps = { platformName: "ANDROID", platform: “android”, deviceName: “android”, app: "/Users/justin/Desktop/NotesList.apk” }
android = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:4723/wd/hub", :desired_capabilities => caps)

[Appium] Welcome to Appium v1.5.2 (REV 39da42bacb746d323e00ce5e293fc0463db7baf0)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"ANDROID","platforn":"android","deviceName":"android","app":"/Users/justin/Desktop/NotesList.apk"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformName":"ANDROID","platforn":"android","deviceName":"android","app":"/Users/justin/Desktop/NotesList.apk"},null,null,null]
[Appium] Creating new AndroidDriver session
[Appium] Capabilities:
[Appium] platformName: 'ANDROID'
[Appium] platforn: 'android'
[Appium] deviceName: 'android'
[Appium] app: '/Users/justin/Desktop/NotesList.apk'
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":tr…

Problem with running app store application

Hi!
I have problem with run application(example: camera)
error.
Can you help with this problem?
I'm trying to use any account: admin, not admin, login as email. I'm always have this error.

Testing on Windows Mobile devices

Can this driver be used to test UWP apps on Windows 10 Mobile devices or emulators?

There seems to be a few issues that reference mobile devices, like #32 and #33. But readme does not mention that the driver can be used with phones.

CalculatorTest should preset the mode to avoid test failing.

First of all, Great work! 💯

My Calc is set in "Programmer" mode, when I run the test, it fails like this

Test Name:  Combination
Test FullName:  CalculatorTest.BasicScenarios.Combination
Test Source:    C:\git\WinAppDriver\Samples\CalculatorTest\BasicScenarios.cs : line 76
Test Outcome:   Failed
Test Duration:  0:00:01.1552979

Result StackTrace:  at CalculatorTest.BasicScenarios.Combination() in C:\git\WinAppDriver\Samples\CalculatorTest\BasicScenarios.cs:line 85
Result Message: Assert.AreEqual failed. Expected:<Display is  8 >. Actual:<Display is  63 >.

If it's on default mode, then all pass ok.

AlarmClockTest - test fails on FindElementsByName("Windows Application Driver Test Alarm");

var alarmEntries = AlarmClockSession.FindElementsByName("Windows Application Driver Test Alarm");
Assert.IsTrue(alarmEntries.Count > 0);

The above assert fails. Any guesses as to why? known issue that will be resolved?

I was able to fix the sample with this below code...but the above code should work IMO b/c I see a button within the list item that has that exact name. I'm now curious if there is limitations on what elements we can find/search?

var alarmEntries = AlarmClockSession.FindElementsByXPath("//ListItem[starts-with(@name, "Windows Application Driver")]");
Assert.IsTrue(alarmEntries.Count > 0);

Does WinAppDriver Support Win32 Desktop App?

Hello

The document says that WinAppDriver supports Classic Windows App Testing. But I are not quite sure that how to understand the Classic windows apps.

So I still want to confirm here, Does WinAppDriver officially support Win32 Desktop App?

Getting Internal Error

I have tried few samples and I'm getting internal error all the time. Attached the image for your review.(This image is taken when I try to open notepad and type "something" on it

image

Calculator sample fails with Unimplemented Command

I am just starting to evaluate this project, and havn't yet gotten anything to work (this is my first thing I tried).

Feels like somethings wrong with the sample? Or the sample requires a newer driver than what is available?

"Unexpected error. Unimplemented Command: xpath locator strategy is not supported"

image

Testing a running AUT

Can I test the already running application or this feature is not yet implemented?

VSO support

Anyone know if there is a service that supports this with VSO? Basically CI with VSO and WinAppDriver

Insufficient documentation on inspecting element using inspect.exe

Hi - I have seen people using FindElementByName or FindElementByAccessibilityId in the code samples,but when we inpect from Windows 10 SDK inspector,how can we assure that we are the right elements' attributes with right methods?Is there any documenation where i can find these mappings from different element finding techniques to the attributes in the inspector console just like in uiautomatorviewer?.Thank You

Support XPath

Could you add support for searching elements by XPath (combine ClassName, Name and UI Automation ID)?

Why doesn't WinAppDriver listen on /wd/hub endpoint per selenium default?

FYI for other folks hitting the issue when attempting to "plug and play" Appium code from another platform. I was hitting a 404 when making my first session call.

POST /wd/hub/session HTTP/1.1 ..... HTTP/1.1 404 Not Found

Took me a couple minutes of debugging to realize my boilerplate server config needed to be tweaked to integrate with this. For Windows automation I have to override my server path to "/" rather than the default of "/wd/hub". It's not a big deal, but kind of annoying.

Getting error while installing WinAppDriver.exe in my laptop

Hi Team,
When I trying to install the WinAppDriver.exe, I am getting the below error. Could you please let me know what prerequisites do we need before installaing the WinAppDriver.exe

My System details:
Windows 7 - OS
.Net Framework - 4.0


WinAppDriver.exe - System Error

The program can't start because api-ms-win-shcore-scaling-l1-1-1.dll is missing from your computer. Try reinstalling the program to fix this problem.

OK

Error: "A new session could not be created" when I use TestAgent and TestController

I configured Test Agent and Test Controllers for my test project in Visual Studio.
I install WinAppDriver on machine with test agent.
I try run this simple code:

[TestClass]
public class TestWithSelenium
{
private TestContext testContextInstance;
public TestContext TestContext
{
get { return testContextInstance; }
set { testContextInstance = value; }
}
protected const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723";
protected static RemoteWebDriver NodepadSession;
protected static RemoteWebElement NodepadResult;

    [ClassInitialize]
    public static void Setup(TestContext context)
    {

        DesiredCapabilities appCapabilities = new DesiredCapabilities();
        appCapabilities.SetCapability("app", @"C:\Windows\System32\notepad.exe");
        NodepadSession = new IOSDriver<IOSElement>(new Uri(WindowsApplicationDriverUrl), appCapabilities);

        NodepadSession.FindElementByClassName("Edit").SendKeys("This is some text");
    }

    [TestMethod]
    public void Addition()
    {
        Assert.IsNotNull(NodepadSession);
    }

}

Notepad is running, then test failed whith error:

Result Message: Class Initialization method Test_Progect.TestWithSelenium.Setup threw exception. System.InvalidOperationException: System.InvalidOperationException: A new session could not be created. (33).

Result StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Appium.AppiumDriver1..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Appium.iOS.IOSDriver`1..ctor(Uri remoteAddress, DesiredCapabilities desiredCapabilities)
at Test_Progect.TestWithSelenium.Setup(TestContext context) in c:\Users\myuser\Documents\Visual Studio 2013\Projects\Test_Progect\Test_Progect\TestWithSelenium.cs:line 31

000

Unable to launch Cordova Hybrid Windows Store Appx: Getting session Error

I am able to launch native windows application successfully by using the below code. But not able to launch Cordova Hybrid Windows App with same code.

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("app", "com.XXXXXXXX.runtime_h365459jr9hy9m!App");
capabilities.setCapability("platform", "Windows");
driver = new RemoteWebDriver(new URL("http://XXXXXXXX.com:4723"), capabilities);
driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);

I can see sometimes the application flashes and exited (in milliseconds) suddenly with the following error:-

HTTP/1.1 500 Internal Error
Content-Length: 101
Content-Type: application/json

{"status":33,"value":{"error":"session not created","message":"A new session could not be created."}}

Taking a Screenshot of UWP

Hi,

I'm wondering, how to take a Screenshot, when using Appium with WinAppDriver. I want to take screenshots from specific pages of my UWP application on Desktop and later on my mobile device or emulator and don't know, how to achieve this.

Arrow keys don't work (just get symbols)

try with something like notepad:

session.FindElementByClassName("Edit").SendKeys(Keys.Up);
session.FindElementByClassName("Edit").SendKeys(Keys.ArrowUp);
session.FindElementByClassName("Edit").SendKeys(Keys.PageUp);

You will get 3 symbols.

How to get the Application id ?

if i want to test Windows Alarms & Clock app, how can I get it's application id?.

In the example, it directly show the application id is 'Microsoft.WindowsAlarms_8wekyb3d8bbwe!App“. but how do I get it by myself?

The note said :
When testing the application you authored yourself, you can find the Application Id in the generetated AppX\vs.appxrecipe file under RegisteredUserNmodeAppID node. E.g. c24c8163-548e-4b84-a466-530178fc0580_scyf5npe3hv32!App

My understanding is if I develop an app by myself, so I can control the authority and get application id in this way. but for the other apps just like "Windows Alarms & Clock app", I don't own it, how can I get application id?

Thanks
Ethan

USB Support for Mobile

Getting screenshots over wifi can significantly impact test performance for apps that require a network connection, so USB support would be great!

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.