How to call POST /session/:sessionId/element/active
How can I call the following api from C#. I am testing a UWP app on windows 10.
POST /session/:sessionId/element/active
Get the element on the page that currently has focus.
active(cb) -> cb(err, element)
https://github.com/admc/wd/blob/master/doc/api.md
If you are using Appium.WebDriver like we do in our samples and tests, you can get the current active element as follows:
WindowsElement activeElement = session.SwitchTo().ActiveElement() as WindowsElement;
More tests are being added to our repo to cover all the API endpoint we support.
Thank you very much for your response. It is very helpful in finding the current active element on the screen. It will be more helpful if more test cases are added and documentation is improved for the apis supported. In my case for C#.
My pleasure. Yes our goal is to make it very easy to get a sample code and to run any API endpoint we support. Please stay tune to this upcoming updates to the samples and tests.