Choosing right library and programming language

When I firstly decided to automate our desktop application I faced with problem of choosing programming language and needed libraries.

As programming language was chosen Python 3.6 as more simpler and perspective.

Next step was choosing needed libraries. I’ve read a lot of sites about automation, many frameworks were shareware. And i’ve found pywinauto. For defining elements was used application SWAPY.

But after few days of work with pywinauto, SWAPY and our application I faced with problems like a launching of app, connecting to app (it was possible to connect to process id only), SWAPY don’t see a lot of elements in our application.

Then I’ve start to research of new approaches for automation and found Winium.Desktop Driver. Winium Driver – it’s a driver developed by 2GIS company for automation Desktop applications with using  Selenium library. Driver helps run and connect to desktop applications and find elements with using Selenium. Winium can find elements by id, classname, xpath. For defining element names, id, we’ve used Visual UI Automation Verify application which included into Visual Studio.

I thought Winium + Seleium it’s a good idea and we’ve started our first steps in automation with this approach, before we faced with first problems. Many elements in our application doesn’t have automation id, and Winium can’t find elements in application by name or xpath. And the second problem of this driver it’s that you need to restart driver when you stop your tests, so stability of your tests on very low level.

Then I started research of pywinauto again. My second attempt was better than first, I’ve spent three days to understand how to connect and run application, how to define elements. For understanding that my approach is right, I’ve choose more complex module of application and try to go through all steps, and got success.

So we started automation process with using Python + pywinauto. In next articles I will write about our framework and IDE

2 thoughts on “Choosing right library and programming language”

  1. Hi Alexander!
    I just wonder – you have desktop .NET app(as I understood it’s written in Windows Forms, WPF or both). For sure you have access to Visual Studio license. I can’t get why do you use python and other strange libraries? Why don’t you use Coded Ui? I automated a very old app written in old unmanaged C++, Findows Forms and WPF and Coded Ui worked perfectly. I mean using Coded Ui engine in your own code, not tool for writing and playing tests (this one is not good).

    1. Hi Serhii! You’ve a good point.
      Yes, you’re right – we have desktop .NET app, and we have license. But, no one from our QA team doesn’t know C#, except developers. Python is more simple and understandable language, as for first language.

Leave a Reply to Serhii Bondarenko Cancel reply

Your email address will not be published. Required fields are marked *