I can't read the inner text of the object HwndWrapper
See original GitHub issueI wanna get text of the object HwndWrapper but when I try get the data with the next code doesn’t return none:
from pywinauto.application import Application
app = Application().start(cmd_line u'"C:\\app.exe"')
role = app[u'Datos Generales']
table = role[u'1']
dataTable = table.texts()
The previus code doesn’t return none.
I appreciate your collaboration with a solution Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Unable to access windows controls inside pywinauto's ...
Trying to set or get Text for TextBox (windows control) inside pywinauto.controls.hwndwrapper.hwndwrapper by using SWAPY, I have Class Name of ...
Read more >pywinauto.controls.hwndwrapper - Read the Docs
This method sends WM_* messages to the control, to do a more 'realistic' mouse click use click_input() which uses mouse_event() API to perform...
Read more >Cannot find the UI element corresponding to this selector
This selects an application named notepad.exe with “Font” in the title. Go ahead, save the file under a new name - your selector...
Read more >There is a problem with the XML that was received ... - MSDN
ProtocolException: There is a problem with the XML that was received from the network. See inner exception for more details. ---> System.Xml.
Read more >Unable to get text from object - Katalon Studio
Aside: I believe (can't be bothered to go look it up) the option.text property will contain a copy of the innerText. But either...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks! It looks like custom grid control that has no standard interfaces for GUI automation. The app was built using MFC framework (it’s pretty old but mostly nice to automate by
"win32"
backend as well).Technically it should be possible to implement custom wrapper for this grid if we had source code of this control (not necessary the source code of the whole app).
Otherwise I can suggest only workaround like
.type_keys("^a^c")
(press Ctrl+A, then press Ctrl+C) and then get text data from clipboard using modulepywinauto.clipboard
. Of course, it’s only grabbing the data, not the full automation.You may try followings,