728x90
1) https://github.com/pywinauto/py_inspect 에 접속하여 code 다운로드
2) python 3.5 이상, pywinauto, PyQt5 설치
3) "python py_inspect.py" 으로 실행
특이사항
1) 실행시 2회 실패 후 3회시 부터 정상 실행됨.
1회 실패시 에러 내용
D:\workspace\py_inspect-master>python py_inspect.py
QWindowsContext: OleInitialize() failed: "COM error 0xffffffff80010106 RPC_E_CHANGED_MODE (Unknown error 0x080010106)"
Traceback (most recent call last):
File "py_inspect.py", line 147, in <module>
main()
File "py_inspect.py", line 12, in main
w = MyWindow()
File "py_inspect.py", line 41, in __init__
self.__initialize_calc()
File "py_inspect.py", line 50, in __initialize_calc
self.tree_model = MyTreeModel(self.element_info, _backend)
File "py_inspect.py", line 77, in __init__
self.__get_next(element_info, self.branch)
File "py_inspect.py", line 81, in __get_next
self.__generate_props_dict(child)
File "py_inspect.py", line 96, in __generate_props_dict
['enabled', str(element_info.enabled)],
File "D:\Python\382_64\lib\site-packages\pywinauto\uia_element_info.py", line 321, in enabled
return bool(self._element.CurrentIsEnabled)
_ctypes.COMError: (-2147024891, '액세스가 거부되었습니다.', (None, None, None, 0, None))
2회 실패시 에러 내용
D:\workspace\py_inspect-master>python py_inspect.py
QWindowsContext: OleInitialize() failed: "COM error 0xffffffff80010106 RPC_E_CHANGED_MODE (Unknown error 0x080010106)"
Traceback (most recent call last):
File "py_inspect.py", line 147, in <module>
main()
File "py_inspect.py", line 12, in main
w = MyWindow()
File "py_inspect.py", line 41, in __init__
self.__initialize_calc()
File "py_inspect.py", line 50, in __initialize_calc
self.tree_model = MyTreeModel(self.element_info, _backend)
File "py_inspect.py", line 77, in __init__
self.__get_next(element_info, self.branch)
File "py_inspect.py", line 81, in __get_next
self.__generate_props_dict(child)
File "py_inspect.py", line 100, in __generate_props_dict
['rectangle', str(element_info.rectangle)],
File "D:\Python\382_64\lib\site-packages\pywinauto\uia_element_info.py", line 326, in rectangle
bound_rect = self._element.CurrentBoundingRectangle
_ctypes.COMError: (-2147220991, '이벤트에서 가입자를 불러낼 수 없습니다.', (None, None, None, 0, None))
2) Microsoft Inspect 와 달리 표시 내용이 제한적임
Microsoft Inspect : https://technote.kr/348oft Inspe
728x90
'Language > Python' 카테고리의 다른 글
[pyinstaller] TypeError: an integer is required (got type bytes) (0) | 2021.09.11 |
---|---|
[pywebview] python 을 이용한 webview (0) | 2021.09.11 |
Python - pipenv 설정 및 사용 (0) | 2021.06.27 |
Python - pywinauto, Microsoft Windows GUI 제어 자동화 (0) | 2020.02.29 |
Python - reduce(), 인자를 누적적으로 적용하여 결과를 반환 (0) | 2020.02.23 |
Python - filter(), iterable 변수 내 값 중 조건에 맞는 값만 반환 (0) | 2020.02.22 |
Python - map(), 함수와 iterable 변수를 인자로 받아 iterator 결과를 반환 (0) | 2020.02.19 |
Python - iterable 과 iterator, 그리고 반복문 (0) | 2020.01.02 |