0

i want to use selenium to automate desktop application but desktop applications does not provide locators and elements X path,how can i locate elements in desktop application

Nazia Sadiq
  • 41
  • 1
  • 10

6 Answers6

2

No, Using selenium we can automate only web based application. Selenium doesn't provide any way to automate desktop applications. For automating desktop application we can use other tools such as AutoIT.

Refer here for some idea->http://seleniumsimplified.com/2016/01/can-i-use-selenium-webdriver-to-automate-a-windows-desktop-application/

santhosh kumar
  • 1,981
  • 1
  • 9
  • 28
  • Is there any other tool to automate Desktop Applications? – Nazia Sadiq Aug 18 '17 at 06:21
  • AutoIT is the one that we use normally. You might get some more tool lists here ->https://blog.testproject.io/2016/12/22/open-source-test-automation-tools-for-desktop-applications/ – santhosh kumar Aug 18 '17 at 06:22
1

Answering your question straight, No, Selenium doesn't support to automate Desktop Applications.

As you want to use Selenium to automate desktop application, Winium can be the best solution to your needs.

Winium:

Winium is a new open source framework, that’s based on Selenium and consists of 3 parts:

  1. Supports test automation on Windows applications.
  2. Supports test automation on Windows Phone operating system context (home button, notifications bar, toggles etc.)
  3. Supports test automation on Windows Phone applications.

Pros:

In case you are already using Selenium WebDriver and familiar with its API, using Winium is straightforward.

Cons:

As a result of it’s being a new project, few struggles come in the way. Its API still isn’t complete and not on the same maturity level as other tools in this category.

Bottom line:

In case you are considering Winium, my suggestion is to wait until it’s more baked.

Additional Resources:

You can find some more Open Source Test Automation Tools for Desktop Applications here.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
1

You can you below tools :

  1. Winium (https://github.com/2gis/Winium ) for windows desktop automation. in this case you'd need to use some desktop inspecting tools like UISpy. benefit of using this would be, you must be aware of methods and calls in selenium, same methods are there in this tool too.

  2. AutoIT : this is less reliable in case your test script does some job on web and later you want to perform something on the desktop. AutoIT script compiles to an exe which can be triggered from the test script BUT remember AutoIT exe/script would start executing from wherever the cursor is located.

  3. I guess you can use AWT classes to do few of the stuff on desktop but it'd incur a lot of time investment in developing the complete flow. (BAD IDEA, don't do that.)

    1. Not very sure but in a few cases, I have seen Sikuli (An image-based automation API) work fine.(have a look on this quick example https://www.guru99.com/sikuli-tutorial.html)
Samarth
  • 130
  • 5
0

We have different ways to handle desktop application using selenium webdriver.

below are the different real time techniques

  1. AutoIT : AutoIT is the best option to work on window based application
  2. Sikuli : Sikuli is image based automation tool.

for more reference visit below link

https://sqa.stackexchange.com/questions/9254/can-i-use-selenium-to-do-desktop-application-testing

Ravi Potnuru
  • 191
  • 4
  • 13
0

No you can't automate native windows application with selenium.

But still you can achieve it by autoit or sikuli and again these tools are having few limitation on element activities, handling and reporting.

I would recommend you to take a look on RPA tools. which is trending in market now. you can automate any kind of apps like browser,native windows, citrix.

Consider uipath or blue prism. I agree these are all not opensource but it's deserved to pay. Uipath you can get some trial version try to use it.

Allt the best!!

0

You can not automate windows windows based application using selenium . Now it depends on whether you want to use open source tools or microsoft tools.

Open source tools :

  1. Auto IT . Its is very fast and its librarry can be integrated with C# or JAva
  2. Microsoft based tools : Coded UI - its the latest tool which can work for both windows based and web based application.
Litisqe Kumar
  • 2,512
  • 4
  • 26
  • 40