-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing Native App using Node.js #626
Comments
Have you tried copying the output of Notepad sample as shown on the WAD console while executing a scenario? |
I am not sure I follow what you mean by copying the output? The output from the WAD console is what I have provided above. Am I missing something? |
I think that is required... Yep...get this error message: (node:2116) UnhandledPromiseRejectionWarning: SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): 'deviceName' can't be blank |
I tried to send keys to the notedpad and it worked.
|
You are using C#, which seems to have the methods such as FindElementByClassName, whereas the JavaScript library doesn't have that. This is where my problem seems to be. |
Yes, I'm using C#. But you can achieve the same with Node.js by sending
GET/POST requests directly to the WinAppDriver as listed in the docs I
suppose.
API calls are after all just a wrapper on underlying JSON wire protocol.
…On Wed, Mar 13, 2019, 12:57 AM SGarno ***@***.***> wrote:
You are using C#, which seems to have the methods such as
FindElementByClassName, whereas the JavaScript library doesn't have that.
This is where my problem seems to be.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#626 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGkP-dIXBZ2aA5kf5gKCdlV-9n4FkMWzks5vWAa8gaJpZM4bnoV_>
.
|
Yeah, I was trying to use the library rather than create my own API. Despite the code being updated in February, it seems that Appium is not keeping up with the changes to WAD. https://github.com/appium/appium-windows-driver |
Appium installs a specific version of WinAppDriver, and currently they install v1.1 We haven't submitted a PR yet to use 1.1.1 but can do so after we get more feedback on 1.1.1. |
I am trying to automate a native windows application using Node.js. I keep getting that Locator Strategy is not supported for this session. Does that mean the 'appium-windows-driver' node module is not able to work with WAD 1.1? Or is there something wrong with my code.
It seems to start notepad ok, but nothing seems to work and there really aren't any docs regarding using WAD with Node.js. The node module I am using doesn't seem conform to the API docs for Java or C# (i.e. there is no function FindElementByName, etc) either. The only function I could find was findElement.
However, nothing seems to work when I try to use it. I have tried passing in 'id', 'name', etc and tried XPath. I assume I am supposed to be using XPath, but again, I can't find anything out there that helps.
Has anyone been able to make this work from Node?
Here is the code I have currently:
Here is the error message:
The text was updated successfully, but these errors were encountered: