This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Monkey patch for pywinauto that adds a first_only parameter to the window function | |
# for the UIA backend, in order to work around slow FindAll calls (win10 bug?) | |
# First copy paste this code on your REPL, then do: | |
# d1 = pywinauto.Desktop("uia") | |
# d1.window(first_only=True, title="Calculator").window_text() | |
# Currently only title is supported, but its easy to implement all the others as well, | |
# most importantly title_re | |
def first_child(self): | |
print("Getting first child") |