1
私は特定のプログラムで自分の仕事を楽にするためにpywinautoを使用しています。私はこのcomboboxアイテムを "対参照"で選択したいと思います。私はapp['Setup Potentiodynamic Experiment'].PrintControlIdentifiers()
を使ってコンボボックスの名前とクラスを取得しました。 、pywinautoで非標準クラスを制御する
Exception in Tkinter callback
Traceback (most recent call last):
File "E:\PY\lib\tkinter\__init__.py", line 1550, in __call__
return self.func(*args)
File "E:/Python projects/test/test.py", line 40, in createxp
app['Setup Potentiodynamic Experiment']["TComboDJ5"].Select("vs. Reference")
File "E:\PY\lib\site-packages\pywinauto\application.py", line 245, in __getattr__
return getattr(ctrls[-1], attr)
AttributeError: 'HwndWrapper' object has no attribute 'Select'
私が理解する限り:
TComboDJ - 'b'vs. Open Circuit'' (L987, T424, R1094, B445)
'b'TComboDJ5''
'b'vs. Open Circuit3''
'b'vs. Open CircuitTComboDJ3''
だから、私がやりたい、私はこれを使用:
app['Setup Potentiodynamic Experiment']["TComboDJ5"].Select("vs. Reference")
をし、次のエラーが表示されたPythonは、次の返却しましたpywinautoはコンボボックスをコンボボックスとして認識できません。それについて何かできますか?
これは完全に機能しました。 Спасибо! – Undeadcookie