The same wrappers accessed in two different ways do not have the same parent.
See original GitHub issueExpected Behavior
The output should be:
True
True
The first True is because wrapper_maximize_button1 == wrapper_maximize_button2 So I expect wrapper_maximize_button1.parent() == wrapper_maximize_button2.parent()
Actual Behavior
The output is:
True
False
False is the result of wrapper_maximize_button1.parent() == wrapper_maximize_button2.parent()
Steps to Reproduce the Problem
- Execute code
Short Example of Code to Demonstrate the Problem
import pywinauto
pywinauto.application.Application().start(cmd_line="explorer.exe")
desktop = pywinauto.Desktop(backend='uia', allow_magic_lookup=False)
if desktop['File Explorer'].is_maximized():
desktop['File Explorer'].restore()
window = desktop.windows(title='File Explorer', control_type='Window')[0]
wrapper_maximize_button1 = window.descendants(title='Maximize')[0]
pt = wrapper_maximize_button1.rectangle().mid_point()
wrapper_maximize_button2 = desktop.from_point(pt[0],pt[1])
print(wrapper_maximize_button1 == wrapper_maximize_button2) # True
print(wrapper_maximize_button1.parent() == wrapper_maximize_button2.parent()) # Should be True
Specifications
- Pywinauto version: 0.6.8
- Python version and bitness: 3.8.3 64bit
- Platform and OS: PC Windows 10
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Wrapper Classes in Java - GeeksforGeeks
A Wrapper class is a class whose object wraps or contains primitive data types. When we create an object to a wrapper class,...
Read more >Cross-window communication - The Modern JavaScript Tutorial
Two URLs are said to have the “same origin” if they have the same protocol, domain and port. These URLs all share the...
Read more >Wrappers to the Rescue - Brian Foote
We have used method wrappers to construct several program analysis tools: a coverage ... The other property is that the new forwarding methods...
Read more >Make buttons (hyperlink) same-size as child in parent wrapper ...
I tried many things with flex and grid but I just can't get it to work. I don't want to use width, max-width,...
Read more >Class extension - Method wrapping and Chain of Command
When you wrap a method, you can also access public and protected ... The wrapper method must have the same signature as the...
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
No more ideas for now. Let’s keep it for a long term. My current priority is 0.7.0. Sorry.
No problem if it takes time to solve this issue. I’m also looking forward to the release of version 0.7.0. Keep up the good work!