Skip to content
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

After using the initially selected appropriate backend for some days, the controls cannot be printed out #1388

Open
veritable5 opened this issue Apr 24, 2024 · 2 comments

Comments

@veritable5
Copy link

Expected Behavior

Print Controls.

Actual Behavior

The printed dialogue window is none.

Control Identifiers:

Dialog - ''    (L0, T0, R1920, B1200)
['Dialog']
None

Steps to Reproduce the Problem

1.At the beginning, more controls were printed by use uia as backend than use Win32.
2.A few days later.
3.The result of using uia to print the control are shown in the previous step.

Short Example of Code to Demonstrate the Problem

from pywinauto.application import Application 
import time
   
self.app = Application(backend='uia').connect(path='C:\APP\Application.exe')
time.sleep(2)
print(self.app.top_window().print_control_identifiers())

Specifications

  • Pywinauto version: 0.6.8
  • Python version and bitness: 3.8.3
  • Platform and OS: windows10
@veritable5
Copy link
Author

The software to be tested has not been updated.

@veritable5
Copy link
Author

I can only see the value of ControlType by UI Spy, currently. I have temporarily solved this problem using the following method.

from pywinauto.application import Application
import time

self.app = Application().start(path)
self.app = Application(backend='uia').connect(path=path)
web_element = self.app.XX系统.window(class_name='AfxFrameOrView100').window(
            class_name='Shell').element_info
parent_window = self.app.window(handle=web_element.handle)
edit = parent_window.child_window(control_type="Edit")
time.sleep(1)
edit.type_keys("test")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant