Problem printing element
See original GitHub issueExpected Behavior
Print out all elements
Actual Behavior
only a small part is printed, an error is thrown;
return bool(IUIA().iuia.CompareElements(self.element, other.element))
_ctypes.COMError: (-2147220991, 'event cannot call any subscribers', (None, None, None, 0, None))
Steps to Reproduce the Problem
1.My automation software is WPF type
Short Example of Code to Demonstrate the Problem
def test(self):
wd = self.app[u"放射影像软件"]
wd.print_ctrl_ids(filename="photograph.txt")
if __name__ == '__main__':
# app = Application(backend='uia').start(r"E:\fs\fs.exe")
app = Application(backend="uia").connect(handle=0x20C04)
ph = Photograph(app)
ph.test()
Specifications
- Pywinauto version: 0.6.7
- Python version and bitness: 3.7.4
- Platform and OS: Windows 10 home
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
13 Common Printer Problems and How to Fix Them
If your printer says you have a paper jam, there are a couple of potential culprits. First, make sure the paper is properly...
Read more >3D Printing Troubleshooting: All Problems & Solutions - All3DP
Complete 3D printing troubleshooting guide. All common 3D printing problems and their solutions. Includes both FDM and SLA 3D printing ...
Read more >Problem in printing array element in awk - Unix StackExchange
I have tried printing the element this way as well: printf "%s",arr[7];. This one works.
Read more >javascript - Problem printing ${el }, I want to print the content of ...
Problem printing ${el }, I want to print the content of the element but it prints $%7Bel%7D. It seems that the jinja detects...
Read more >Troubleshoot print issues in Microsoft Edge
In this case, the issue might be caused by a style element on the page. To try to eliminate the style elements as...
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

Sorry, I missed the info that button is really clicked. Well, the exception is raised by
UIAutomationCore.dllso the right question is “what Microsoft wants to tell us?”. But this is not an empty implementation. Of course we can handle this kind of error and convert it toRuntimeWarning. But please create separate issue on it. This is completely different to the initial issue.Sometimes we also face with hang problem when calling
.invoke()(.click()is an alias of.invoke()for ButtonWrapper). It means we need to create a separate thread with some timeout and print a warning if it is timed out. This is also separate issue, but we can combine it in one issue since it is all in.invoke()method.@vasily-v-ryabov I could agree with you, but I still think there’s something wrong with pywinauto. The main reason is because the button is clicked as expected. I could use
click_input()but there is no real reason to do so.I am running my script with the code bellow and it does not present any instability:
The question is, why pywinauto is raising an exception if it is working as expected? I understand that maybe it detected some bad implementation in the invoke method or something, but since the method is fired, what pywinauto is trying to tell me with this exception? Is there something weird happening that I should be handling?
Got my point? Or there is a good explanation for this, or it is a bug since the exception is useless.
At least, it should catch this exception and provide specific information about the problem, instead of raising a generic COM Error.