2016-12-14 1 views
0

AutoIt을 사용하여 창 프레임에서 CheckListBox 객체 (저는 Delphi라고 생각합니다)를 감시 할 수 없습니다. 이 지역에서는 아무 것도 볼 수 없습니다. 나는 그 지역에서 물건의 목록을 얻고 아마도 하나의 물건을 선택할 필요가있다.AutoIt을 사용하여 CheckListBox에 스파이 활동을 할 수 없습니다.

저는 python과 robotframework를 사용하고 있습니다.

self.get_autoit().ControlListView("Setup - XXXXX", "Select the XXXX", "[CLASS:TNewCheckListBox; INSTANCE:1]", "GetText") 

을하지만 예외 : :

또한 ControlListView를 사용하여 시도

com_error: (-2147352561, 'Parameter not optional.', None, None) 

오류가 pywinauto에 문제가 될 것으로 보인다.

어쨌든이 성가신 개체에서 항목 목록을 가져올 수 없습니다.

AutoIt을 스파이의 결과는 화면에 있습니다

result from autoit spy

은 사람이 알 수없는 영역에서 항목의 목록을 액세스 할 수있는 좋은 방법을 제안시겠습니까?

나는 inspect.exe에서 내부 항목을 볼 수 있습니다 :

from inspect.exe

+0

, 그것은 TRadioGroup – Dsm

+0

[pywinauto] (https://github.com/pywinauto/pywinauto) 또는 [pyautoit] (https://github.com/jacexh/pyautoit처럼 보인다)? 2 개의 다른 라이브러리가 있습니다. pywouto가 아니라 pyautoit을 사용하는 것 같습니다. –

+0

쀼이 나우 토를 사용하고 있습니다. 로봇 프레임 워크의 autoitlibrary는 pywinauto를 사용합니다. –

답변

0

이 코멘트에 바실리에서 자세한 대답을 참조하십시오. 그러나 요약하려면 :

원래 문제는 pyautoit를 사용하여 CheckListBox에서 항목 목록을 가져 오려고했지만 작동하지 않았기 때문입니다. 바실리에 의해 제안 그래서, 나는 UIA 모드에서 pywinauto (다른 자동화 도구)를 사용하고 나를 위해 일한 다음 :

self.Wizard = Application(backend="uia").connect(title = self.installerTitle) #connect the application 
self.Wizard.InstallerDialog.TreeView.wait('visible', timeout=150) #wait for tree view to load 
     items = self.Wizard.InstallerDialog.TreeView.children() #get the children of tree view 
     for item in items: #iterate through items, radio button in this case 
      if item.window_text() == "item_name_to_select": 
       item.click_input() #click radio button if the text is what we are looking for 
       return 
     print "no item found with name: item_name_to_select" 

가장 도움이 트릭은 컨트롤의 식별자를 얻을 수 pywinauto에 print_control_identifiers() 방법을 사용하는 것이 었습니다. 또한 uia 모드의 inspect.exe은 개체 식별에 도움이되었습니다.

이 AA TCheckListBox처럼 보이지 않는
+0

솔루션을 찾았 으면이를 솔루션과 공유하고 전체 솔루션을 답으로 게시하십시오. 여러 의견을 읽고 답안의 조합이 해결책이라고 생각하는 것은 어렵습니다. – RBA

관련 문제