How to connect to the running windwows application with pywinauto?

2.4k Views Asked by At

I'm having a problem connecting to a running window application that was opened in the browser via citrix links. I have a snippet of the window name here. How can I find out if pywinauto can see the running window of the application?

Which code do I need for this?

My code doesn't work:

import pywinauto
from pywinauto.application import Application


app = Application(backend='uia').connect(title = 'Applikationsmenü - Produktivsystem der 
LogSys-Applikation für XY')

Running Appliciation

Task Manager

1

There are 1 best solutions below

8
Sachin On

Use process Id, see sample code

from pywinauto import application
from pywinauto.application import Application

# add your exe name here; you can get via Task Manager
yourExeName = ""  

# get PID of your running process
pid = application.process_from_module(module = yourExeName)

# use Pid to connect
app = Application(backend='uia').connect(process = pid)