I'm having an unusual problem lately that when I open some excel/word document and try to connect to it's process using -
app = pywinauto.Application(backend="uia").connect(process=19812)
It seems not to work, meaning that app.is_process_running() returns False and the top_window() method raises the RuntimeError(No windows for that process could be found) exception.
But if I run the actual executable program (Winword.exe or Excel.exe and not some *.xls file), it seems to work properly and everything seems to work fine.
I checked the UIA compatibility with inspect.exe on the documents and everything seems to be fine.
What can be the problem here?
Running the python script with admin privileges solved the problem :\
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With