GManNAtl Posted October 7, 2019 Posted October 7, 2019 I have dug in deep and figured out quite a bit about UIA and have my first script working, but have one issue. How do I turn off the "red highlighting" that occurs as the elements are selected? Also, does a function reference exist for this UDF? Reading through the examples I've learned a lot, but I am sure there are some things I could learn with more complete documentation. I apologize if either of these have been answered, but I assure you I've googled both to death and didn't come up with anything.
junkew Posted October 7, 2019 Posted October 7, 2019 Its in the first 4 posts of the examples in IUIAutomation thread where you found the UDF library. And if you have dug in deep you can see in UIA.CFG a highlight=true UIA.CFG example expandcollapse popup; This is an inifile for UIA wrappers having the configuration defaults ; Debug=true Turn debugging on of off with true/false value ; Highlight=true Turn Highlighting rectangle to true / false ; TODO: AutoStartSUT=true AutoStartSUT is starting all SUT's automatically [Global] Debug=false Debug.file=false Highlight=true AutoStartSUT=false [Multiuser] CFGPerUser=false [Folders] subfolders=false ;System under test settings ; Folder = Location where exe can be found ; Workingdir = Location of the working directory ; exe = Name of the exe to start ; Fullname = Path & name of exe ; Windowstate = minimized, maximized, normal [SUT1] Folder=%Windowsdir%\system32 Workingdir=%Windowsdir%\system32 exe=calc.exe Fullname=%Windowsdir%\system32\calc.exe Parameters= Processname=calc.exe Windowstate=normal [SUT2] Folder=%Windowsdir%\system32 Workingdir=%Windowsdir%\system32 exe=notepad.exe Fullname=%Windowsdir%\system32\notepad.exe Parameters= Processname=notepad.exe Windowstate=normal [SUT3] C:\Program Files (x86) Folder=%programfilesdir%\Microsoft Office\Office14 Workingdir=%programfilesdir%\Microsoft Office\Office14 exe=winword.exe Fullname=%programfilesdir%\Microsoft Office\Office14\winword.exe Parameters= Processname=winword.exe Windowstate=normal [notepad] mainwindow=title:=((Naamloos.*Kladblok)|(Untitled.*pad));classname:=Notepad mainwindow.edit=title:=;classname:=Edit closewindow=title:=((Kladblok)|(Notepad));classname:=#32770 closewindow.save=title:=Save;classname:=CCPushButton closewindow.Don'tSave=title:=((Don't Save)|(Niet opslaan));classname:=CCPushButton closewindow.Cancel=title:=((Cancel)|(Annuleren));classname:=CCPushButton An action reference is there when you study Func _UIA_action($obj_or_string, $strAction, $p1 = 0, $p2 = 0, $p3 = 0, $p4 = 0) each line that starts with case in that function will tell you the actions possible Case "leftclick", "left", "click", _ Case "setValue", "settextValue" Case "setValue using keys" Case "setValue using clipboard" Case "getValue" Case "sendkeys", "enterstring", "type", "typetext" Case "invoke" Case "focus", "setfocus", "activate", "switchto" Case "close" Case "move", "setposition" Case "resize" Case "minimize" Case "maximize" Case "normal" Case "close" Case "exist", "exists" Case "searchcontext", "context" Case "highlight" Case "getobject", "object" Case "attach" Case "capture", "screenshot", "takescreenshot" ;~ Case "getInnerHTML" ;~ case "getBodyText Case "dump", "dumpthemall" Case "propertyvalue", "property" Case Else FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now