Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get list of open windows in Python

I am writing an app in Python that must be able to send keys or text to another app. For example, if I have Firefox open, I should be able to send it an URL to open it.

I already have the SendKeys module, and I have read about the win32 module too, but I do not know if there is a way to filter out process without open windows.

like image 725
Eligio Becerra Avatar asked Dec 22 '22 06:12

Eligio Becerra


1 Answers

Usually, for this sort of "GUI automation" pyWinAuto is a good way to go. We use it to allow automated testing of GUI applications, and it ought to let you "type" URLs into Firefox (not to mention finding its window) as well.

like image 85
Peter Hansen Avatar answered Jan 04 '23 03:01

Peter Hansen