licanhua / ywinappdriver Goto Github PK
View Code? Open in Web Editor NEWA open source project provides WinAppDriver compatible functionality
License: MIT License
A open source project provides WinAppDriver compatible functionality
License: MIT License
app
property should not be required when the user provides a native window handle for creating a session.
I am getting the following error message:
{"error":"SessionNotCreateException","message":"JsonSerializationException: Cannot write a null value for property 'app'. Property requires a non-null value. Path 'desiredCapabilities'."
Sorry to bother you, but you seem very knowledgeable on this subject. How can I make the appium server point to YWinAppDriver through the appium-windows-client? I want to (try to) use your driver as I think you may have fixed many of the issues with touch/action_chains/xpath (also, size and location calls). In another comment on the winappdriver you mention something like this:
client <-> appium <-> appium-windows-driver <-> WinAppDriver
I would like to make it:
client <-> appium <-> appium-windows-driver <-> YWinAppDriver
I've tried connecting directly to YWinAppDriver, but I get the bad capabilities messages (expecting desiredCapabilities, got capabilities). I even tried cracking open your code and just directly inserting my app into the launch arguments but as soon as it got the capabilities back from appium it failed ๐, I guess I need this middle thing appium-windows-driver to do a lot of communicating that I just am not seeing.
I work on a larger project that includes other mobile platforms and neglected to test everything on winappdriver before we moved to the new selenium(v4.3)/appium versions, would this help me or do I just need to admit that I didn't properly vet the new versions before and see if we can move back to selenium v3?
Hello @licanhua
Thank you for your great work on this project. My name is Mykola and I am one of Appium core developers. We are considering to incorporate your implementation of the WDA server with Appium instead of the one which has been abandoned by Microsoft.
I would like to know if you are interested in such cooperation and if you have plans for further long time project maintenance and development.
Basically, what we have on our roadmap for now is the full W3C protocol support and various bugfixes.
Thank you for your time.
Hi,
I have attempted to use the YWinAppDriver to automate WPF applications. Similar to the WinAppDriver, I was unable to right click on elements (and I've even logged an issue here with no response: microsoft/WinAppDriver#1677).
I've decided to try using the YWinAppDriver to overcome this issue. I am using the following versions:
Appium-Python-Client==2.1.2
Selenium==4.1.0
I've attached the following python Code over here:
AlarmClockTest.txt
Here are the logs that are produced as a result:
WinAppDriverLog.log
I notice that when trying to right click on the element, the logs report a 404 on line 77
Response 404: 127.0.0.1:4723 /session/279196bb-d37f-4293-80c7-9953fabc984a/actions
does this mean actions has not been implemented yet?
Please advise other alternatives to how I can go about implementing right clicking with the versions of Appium-Python-Client and Selenium provided.
@varun210619, Can you try the XPath with YWinAppDriver? I want to know if there is performance improvement compared to WinAppDriver. If the performance is significant, I can talk with WinAppDriver team and present my implementation of XPath.
Currently the there are two difference when you are using XPath.
/Window/Window[1]/Button[2]
/Body/Window/Unknown/Button[2]
I executed the calculator test but nothing appears in the console window when the tests are executed. Is it expected.
Hi,
appreciate your work and I would like to use YWinAppDriver in my project.
In my project I just replaced the WinAppDriver and gave it a go.
However when selecting an entry in a dropdown menu (which was opened in a previous click) this error occurs:
"Didn't found the element in cache" and the program fails.
While debugging the value of the variable is not null, as seen in this if statement where the error is thrown:
if (element != null)
{
element.Click(); // error occurs here
}
Is it also possible to implement the screenshot feature of Selenium ? Would be very helpful.
Best regards and thanks
Hi,
The calculator test was failing on my Windows 11 Pro laptop.
Though the Calculator App was launched successfully, I got the below error after launch:
System.InvalidOperationException
HResult=0x80131509
Message=Unable to find Windows.UI.Core.CoreWindow|WinUIDesktopWin32WindowClass in {Calculator, ApplicationFrameWindow, }
Source=WebDriver
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.AppiumDriver
1..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
at CalculatorTest.CalculatorSession.Setup(TestContext context) in C:\YWinAppDriver\YWinAppDriver-0.3.1.0\examples\CalculatorTest\CalculatorSession.cs:line 42
at CalculatorTest.ScenarioStandard.ClassInitialize(TestContext context) in C:\YWinAppDriver\YWinAppDriver-0.3.1.0\examples\CalculatorTest\ScenarioStandard.cs:line 94
I had to add else loop after line 54 in UIObjectHelper.cs to make it work
The below is how my code looks now
...
...
50 if (currentTimeout < 0 && element == null)
51 {
52 throw new UIObjectNotFoundException(
53
54 }
55 else // by Saif
56 {
57 break;
58 }
...
...
Just want a confirmation, is this correct? Or am I missing something?
Thanks,
Saif.
Hi,
One of the core concern in adopting WinAppDriver is a pre-requisite on Enabling Developer mode.
Thanks,
John
I cloned the repo, but when I try to run the calculator tests I get the below exception:
Message:
Class Initialization method CalculatorTest.ScenarioStandard.ClassInitialize threw exception. System.InvalidOperationException: System.InvalidOperationException: Unable to find Windows.UI.Core.CoreWindow in {Calculator โ- Calculator, ApplicationFrameWindow, }.
Stack Trace:
RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) AppiumDriver
1.Execute(String driverCommandToExecute, Dictionary2 parameters) RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) RemoteWebDriver.ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) AppiumDriver
1.ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
WindowsDriver`1.ctor(Uri remoteAddress, DesiredCapabilities desiredCapabilities)
CalculatorSession.Setup(TestContext context) line 42
ScenarioStandard.ClassInitialize(TestContext context) line 94
I started the winappdriver.exe and it shows the below info:
Hi @licanhua
I have just changed the service in the wdio conf file and receive this error when trying to start the tests.
Execution of 1 spec files started at 2021-06-17T08:55:14.276Z
2021-06-17T08:55:14.307Z ERROR winappdriver-service: <Buffer 41 20 66 61 74 61 6c 20 65 72 72 6f 72 20 6f 63 63 75 72 72 65 64 2e 20 54 68 65 20 72 65 71 75 69 72 65>
Launcher failed to start the test undefined
services: [
['ywinappdriver', {
logPath : './'
}]
],
Any ideas?
Hi there, this is just a quick question: WinAppDriver project mentioned about developer mode at https://github.com/Microsoft/WinAppDriver#install--run-winappdriver, does this project require the same set up?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.