You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to automate a third party desktop application but while reading control tree of one of the screen
It seems some of the control is having null value, Please suggest a workaround as due to this error i am not able to read the controls.
//Error
C:\Thome\BASS_PO\venv\Scripts\python.exe C:\Thome\BASS_PO\check1.py
Traceback (most recent call last):
File "C:\Thome\BASS_PO\check1.py", line 40, in
PODlg.print_control_identifiers()
File "C:\Thome\BASS_PO\venv\lib\site-packages\pywinauto\application.py", line 624, in print_control_identifiers
ctrl_names = findbestmatch.get_control_names(ctrl, all_ctrls, txt_ctrls)
File "C:\Thome\BASS_PO\venv\lib\site-packages\pywinauto\findbestmatch.py", line 309, in get_control_names
names.append(cleaned + friendly_class_name) TypeError: can only concatenate str (not "NoneType") to str
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to automate a third party desktop application but while reading control tree of one of the screen
It seems some of the control is having null value, Please suggest a workaround as due to this error i am not able to read the controls.
//Code
PODlg = app.window(title_re=".Purchase Order .")
findbtn = PODlg.child_window(title="tbItemFind", control_type="SplitButton")
PODlg.print_control_identifiers()
//Error
C:\Thome\BASS_PO\venv\Scripts\python.exe C:\Thome\BASS_PO\check1.py
Traceback (most recent call last):
File "C:\Thome\BASS_PO\check1.py", line 40, in
PODlg.print_control_identifiers()
File "C:\Thome\BASS_PO\venv\lib\site-packages\pywinauto\application.py", line 624, in print_control_identifiers
ctrl_names = findbestmatch.get_control_names(ctrl, all_ctrls, txt_ctrls)
File "C:\Thome\BASS_PO\venv\lib\site-packages\pywinauto\findbestmatch.py", line 309, in get_control_names
names.append(cleaned + friendly_class_name)
TypeError: can only concatenate str (not "NoneType") to str
Beta Was this translation helpful? Give feedback.
All reactions