WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Appium vs WinAppDriver direct differences

Open james1301 opened this issue 2 years ago • 4 comments

Hi I am wondering what the actual differences from running Appium or directly the WinAppDriver. Using Appium I seem to get better exceptions like NoSuchElementException and NoSuchWindowException, but using directly I get just a WebDriverException. It doesn't allow very good error catching using the WinAppDriver by default. But I am now needing to use the WinAppDriver as I want to use mouse actions etc, which for some reason don't work through Appium.

Is it detailed anywhere these details I am talking about? It is all quite confusing why the behaviour would be different. Currently I am being forced to match on the error message which isn't ideal and is a bit of a code smell.

james1301 avatar Jun 28 '22 10:06 james1301

Hi @james1301, regarding this I would say that if you use Appium, you are simply using WinAppDriver behind the scenes.

I am testing a only a desktop application so I don't need Appium. In case I get an error, exceptions are quite explicit. Can you please share some examples?

igorrecioh avatar Jun 29 '22 06:06 igorrecioh

Hi here is a sample project. Split into 2 test class files, one expecting Appium running and the other the WinAppDriver direct. As you can see different exceptions are required for direct vs appium. And worst of all Appium does not allow the actions to be performed which is very limiting.

Appium vs WinAppDriver Direct.zip

james1301 avatar Jul 05 '22 08:07 james1301

Also, using the Appium bridge degrades performance for no real gain.

ChristoWolf avatar Sep 10 '22 18:09 ChristoWolf

For what its worth, you have to use selenium actions (TouchActions and ActionChains) in order to get the mouse movement type actions to work and you'll need to stick on at selenium v3 and whichever version of appium client that'll support that. I'd say unless you are working on something multiplatform its just going to be way more straightforward to work directly with winappdriver (in C# also)

pdisser8 avatar Sep 21 '22 21:09 pdisser8