Alexander
Alexander

Reputation: 157

Python Pywinauto no control_identifiers or children in application

Hey everyone I'm having a hard time automating a specific application. Using pywinauto I want to automate clicking, keypresses, etc. to login and benchmark this application but for some reason I can't find any control identifiers for this application. Am I doing something wrong? I used this same method with task manager and other applications and this works fine.

Important Documentation: Code Example Class Doc

Code:

import pywinauto
app = pywinauto.application.Application()
window_handle = pywinauto.findwindows.find_windows(title = u'Name of application')
#print window_handle #makes sure to see if handle exists
window = app.window_(handle = window_handle[0])
print window.Children() #first approach
print app.top_window_()._ctrl_identifiers() #second approach

Output:

>>>[]
>>>{}

Has this happened to anyone before and has found a way around it? Should I just resort to using pywin32 instead? Thank you!

Upvotes: 0

Views: 2937

Answers (1)

Alexander
Alexander

Reputation: 157

Turns out the application does have control identifiers I just needed to get past the first screen. Using window.TypeKeys("{TAB}{TAB}{ENTER}") I was able to navigate past the home screen with keypresses and into the actual application which had all the identifiers.

Useful Links if anyone encounters this problem.

What is a control Identifier?

Upvotes: 2

Related Questions