Giter VIP home page Giter VIP logo

ywinappdriver's People

Contributors

dependabot[bot] avatar gitii avatar licanhua 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ywinappdriver's Issues

Unable to create session with attachToTopLevelWindowClassName

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'."

image

Working with selenium v4?

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?

Server integration with appium-windows-driver

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.

Unable to Right click on Alarm Clock Element

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.

XPath

@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.

  1. YWinAppDriver has /Body/ parent, while WinAppDriver doesn't
  2. YWinAppDriver mark the first as Unknown, but WinAppDriver marks it as Window.

In WinAppDriver,
image

/Window/Window[1]/Button[2]

YWinAppDriver
image

/Body/Window/Unknown/Button[2]

Element in dropdown menu not found

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

Calculator Test Failed

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.AppiumDriver1..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 $"Timeout after ${timeoutInMilliseconds}: Unable to find {string.Join("|", classNames)} in {topWindow}");
54 }
55 else // by Saif
56 {
57 break;
58 }
...
...

Just want a confirmation, is this correct? Or am I missing something?

Thanks,
Saif.

Do we need Developer Mode enabled to execute tests?

Hi,

One of the core concern in adopting WinAppDriver is a pre-requisite on Enabling Developer mode.

  1. With YWinAppDriver, do we still need to enable Developer Mode?
  2. How easy to migrate frameworks and Test Scripts from WinAppDriver to YWinAppDriver?

Thanks,
John

Exception thrown while trying to run the calculator tests

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) AppiumDriver1.Execute(String driverCommandToExecute, Dictionary2 parameters) RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) RemoteWebDriver.ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) AppiumDriver1.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:

image

Launcher failed to start the test undefined Error When Switching From WinAppDriver to YWinAppDriver

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?

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.