Has anyone used playwright for test automation of desktop applications? Is this really possible as web results seem to indicate that playwright can be used to automate desktop top apps but other than that not finding much on the web on this.
Has anyone used playwright for test automation of desktop applications? Is this really possible as web results seem to indicate that playwright can be used to automate desktop top apps but other than that not finding much on the web on this.
Share Improve this question asked Jan 20 at 7:33 InDepthInDepth 195 bronze badges 3- What kind of desktop application? If it's electron, please see Electron desktop Application testing with[PLAYWRIGHT] – ggorlen Commented Jan 21 at 14:44
- It’s Windows based application written in Java (Swing mostly) but other than that couldn’t find much. I tried finding out whether it was WPF, Winforms or Something else bit haven’t found a good way to find that out either. People have suggested using reflection API for .Net or C# but I only have .exe – InDepth Commented Jan 27 at 7:00
- 1 Playwright doesn't support testing Java Swing or WPF apps. – ggorlen Commented Jan 27 at 14:22
1 Answer
Reset to default -1Playwright has limited support for testing desktop applications. According to the Playwright documentation, it supports automating applications based on Electron or Microsoft Edge WebView2. And in the GitHub issue #10927, people are talking automating applications based on the Chromium Embedded Framework (CEF) with mixed success.
At its core, Playwright is using the Chrome DevTools Protocol (CDP) for automating web browsers. So if you have a desktop app that can be automated via CDP, you may be able to test it with Playwright. But if you are planning to test an app built with some other desktop framework (such as WinUI, UWP, WPF, React Native, Qt, etc.), you may want to look into other options.