Search the Community
Showing results for tags 'uiawrapper'.
-
I'm pretty new to using the UIAWrapper.au3 and UI Automation. I'm working on automating a UI where I have a button without a title and I'm using a text box, which is child of the button to get at it. I'm able to get the button element and click on it, but every time I run the script when it finishes it gives the following error: Here is my code: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <constants.au3> #include <WinAPI.au3> #include <debug.au3> #include <CUIAutomation2.au3> #include <UIAWrappers.au3> #include <WinAPI.au3> #include <WinAPISys.au3> $cAppIdent = "title:=SomeProgram" $oApp = _UIA_getFirstObjectOfElement($UIA_oDesktop, $cAppIdent, $treescope_children) $oTW=ObjCreateInterface($UIA_pTW, $sIID_IUIAutomationTreeWalker, $dtagIUIAutomationTreeWalker) Local $oparentHandle $oParent=_UIA_getFirstObjectOfElement($oApp,"name:=Setu_p", $treescope_subtree) $oTW.getparentelement($oParent,$oparentHandle) ;Get Parent button element $oParentHandle=objcreateinterface($oparentHandle,$sIID_IUIAutomationElement, $dtagIUIAutomationElement) $setupbutton = _UIA_getFirstObjectOfElement($oParentHandle,"class:=Button", $treescope_subtree) _UIA_Action($setupbutton, "click") Exit