Windows GUI automation library written in Python
Questions tagged [pywinauto]
763 questions
13
votes
3 answers
pytest - Windows fatal exception: code 0x8001010d
I am trying to run a GUI test using pytest and pywinauto. When I run the code normally, it does not complain.
However, when I am doing it via pytest, it throws a bunch of errors:
Windows fatal exception: code 0x8001010d
Note that the code still…
![](../../users/profiles/11935737.webp)
Joe
- 163
- 6
12
votes
4 answers
Cannot import pywinauto on Windows 10
I installed pywinauto using pip install pywinauto.
OS: Windows 10
Python: 3.6.2
When I run python and try to import pywinauto, I get the error:
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help",…
![](../../users/profiles/7254633.webp)
John Anderson
- 21,424
- 2
- 11
- 29
12
votes
2 answers
How to get a list of the name of every open window?
How do I get a list of the name/text of all opened windows?
I tried pywinauto:
pywinauto.findwindows.find_windows(title_re="*")
but using * as a regex raises an error
I tried win32gui:
It…
![](../../users/profiles/10385242.webp)
user10385242
- 197
- 1
- 1
- 8
10
votes
4 answers
PyWinAuto still useful?
I've been playing with PyWinAuto today and having fun automating all sorts GUI tests. I was wondering if it is still state of the art or if there might be something else (also free) which does windows rich client automation better.
![](../../users/profiles/361.webp)
stimms
- 39,499
- 27
- 88
- 144
8
votes
1 answer
Python - Control window with pywinauto while the window is minimized or hidden
What I'm trying to do:
I'm trying to create a script in python with pywinauto to automatically install notepad++ in the background (hidden or minimized), notepad++ is just an example since I will edit it to work with other software.
Problem:
The…
![](../../users/profiles/2434361.webp)
Carlos Barros
- 199
- 1
- 4
- 10
7
votes
2 answers
How can i find available dialogs ,controls of an application in pywinauto?
I am using pywinauto in windows 7 and I am searching for a way to find the available dialogs and controls of an application.The following is an example:
from pywinauto import application
import…
![](../../users/profiles/896317.webp)
IordanouGiannis
- 3,541
- 12
- 52
- 87
7
votes
1 answer
Pywinauto - Can't connect to office documents using the UIA backend
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()…
![](../../users/profiles/7014995.webp)
Drxxd
- 1,701
- 8
- 26
7
votes
1 answer
Interacting with buttons/macros inside excel automatically
I'm trying to find a way to make a python script that finds all the buttons/checkboxes inside an excel document and interacts with them randomly.
I've tried using pywinauto, but it doesn't find the actual objects inside the document (probably…
![](../../users/profiles/7014046.webp)
cydan
- 615
- 5
- 15
7
votes
2 answers
Press key with pywinauto
Extremely straightforward question.
Just want to press a keyboard key. Like enter, using pywin auto. I don't want to press it in the context of any application window.
Just a raw keypress of a keyboard key, like a or enter or backspace.
![](../../users/profiles/6903224.webp)
Hangfish
- 196
- 2
- 4
- 13
7
votes
1 answer
pywinauto wait for window to appear and send key-press
I'm trying to make a small function that will wait until a certain window appear and then send a key-press (alt+i), i've been trying to do this with pywinauto but with no success.
from what i've read in the documantation i can use…
![](../../users/profiles/4457687.webp)
Alex Zel
- 572
- 1
- 9
- 24
6
votes
2 answers
Pywinauto timings waiting 0.5 seconds instead of immediate
I have the following Pywinauto code and timings waiting is 0.5 seconds instead of immediate. How to get itimmediately?
To click a button and go to the next message:
from pywinauto import application, timings, mouse
import time
app =…
![](../../users/profiles/7086396.webp)
Moacir
- 770
- 4
- 18
6
votes
2 answers
WindowsContext: OleInitialize() failed: "COM error 0x80010106 RPC_E_CHANGED_MODE (Unknown error 0x0ffffffff80010106)"
I'm programming in python 3.4.4 (32 bits), in windows 8. I'm running an app with PyQt5, the app was working well, but since i installed pywinauto 0.6.4 to set the focus on other app with:
other_app =…
![](../../users/profiles/10058479.webp)
JoakoLowRider
- 71
- 1
- 5
6
votes
1 answer
Using pywinauto.top_window() hangs when using it with threads
If I create a thread that all it does is connect to some process and get its top window, then the program hangs.
I debugged it a little and it seems to get stuck in comtypes._compointer_base.from_params. This is the whole traceback:
...
->…
![](../../users/profiles/7014046.webp)
cydan
- 615
- 5
- 15
6
votes
4 answers
Pywinauto: unable to bring window to foreground
Working on the Python-powered automation tool.
Imagine there is a pool of apps running:
APPS_POOL = ['Chrome', 'SomeApp', 'Foo']
The script runs in the loop (every second) and needs to switch randomly between them:
# Init App object
app =…
![](../../users/profiles/865866.webp)
0leg
- 10,406
- 13
- 54
- 88
6
votes
1 answer
How can I send text when the window is minimized?
I have tried using python libraries: pyautogui + pwinauto.
But to no avail.
Once the window is minimized the text is no longer send.
code snippet:
import pyautogui
import…
![](../../users/profiles/3438538.webp)
george
- 625
- 2
- 7
- 19