Is it possible to test desktop applications using selenium? Suppose we have a simple application like gtalk. A desktop application, can we automate that application with selenium.
No, Selenium 2 / WebDriver is for web applications only. But there are other tools to automate desktop application GUI tests.
You can also search for "desktop application" on this site to find recommended tools.
Selenium does not have the capability to automate the desktop applications.It cannot recognize the objects in a desktop application. Selenium drives the testing using the driver object that identifies the elements on screen using id, cssselector, xpath etc. which are not present in a desktop app. Though there is ID behind the elements in a desktop app but as we all know that IDs are dynamic and cannot be relied on. Testers use autoIT,sikuli along with selenium to interact with windows UI if required by a website i.e. for the features like upload a file etc.
Winium.Desktop is an open source test automation tool for automated testing of Windows application based on WinForms and WPF platforms. Winium.Desktop.Driver implements Selenium Remote WebDriver and listens for JsonWireProtocol commands.
Twin is a tool for automating Windows graphical applications.The design is based on the web automation tool Selenium/WebDriver, and it can be used in similar ways. Grid 2.0 from webdriver was designed with TWIN in mind, so you can test against multiple virtual machines with different OS installed and let grid 2.0 install the last version of the AUT and route the tests to the correct VM. You can explore and download it from here: https://code.google.com/archive/p/twin/
If the desktop application is Java Swing or Java FX based then you can use
marathon-java-driver which allows you to connect to your application using Selenium RemoteWebDriver and make calls.Disclaimer that I'm also one of the contributor for the project.
No, not with Selenium. If you are willing to consider something besides Selenium, look at SmartBear's TestComplete. It works well with web apps and desktop apps.