New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement native backend for WPF applications #1210
base: atspi
Are you sure you want to change the base?
Conversation
implemented: children(), class_name, name (temporary works like auto_id)
Also "1 new alert" is found by LGTM. |
pywinauto/controls/wpf_controls.py
Outdated
for i in range(1, items_cnt): | ||
menu = next_level_menu(menu, menu_items[i], items_cnt == i + 1) | ||
except AttributeError: | ||
raise IndexError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any error message? Or maybe better forward it from AttributeError
object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines is copied from the same method from UIA backend (uia_controls.py
, line 1129).
Is it need to add error messages to the UIA-related method too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to do it in both places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Note: these exceptions are usually raised when trying to access field of None
value, wrong index in a list, etc. I added the variable to store index of the current item in menu path and use this index in the raised exception message.
due to conflict with get_properties in BaseWrapper
d2b4d2b
to
7ff48f6
Compare
2b1749d
to
dba70a8
Compare
dba70a8
to
9600950
Compare
This backend uses .NET DLL injection to find WPF widgets, get their properties and perform actions on them.
TODOs:
ListView
inGridView
mode,DataGrid
).type_keys()
sporadic unit test failure (self-resolved?)injected
submodule