Jump to content

u547899

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by u547899

  1. I modified my code to this: $element = _UIA_getObjectByFindAll($section, 'title:=Timeframe:;classname:=WindowsForms10.EDIT.app.0.202c666') ConsoleWrite(_UIA_action($element, 'getvalue') & @CRLF) _UIA_action($element, 'setvalue', '') Sleep(1000) $element2 = _UIA_getObjectByFindAll($section, 'title:=Timeframe:;classname:=WindowsForms10.EDIT.app.0.202c666') ConsoleWrite(_UIA_action($element2, 'getvalue') & @CRLF) The output was still the same. I'll probably go ahead and just use ^a^c to copy the text for verification as I prefer using a different method than what was used to set the data to verify. Thanks!
  2. I have a textbox [classname:=WindowsForms10.EDIT.app.0.202c666] on my page that I am trying to set the value of like this: _UIA_action($element, 'setvalue', 'foo') That works, and if I do this afterwords I get the expected value: _UIA_action($element, 'getvalue') If I send '' (empty string) instead of 'foo' in my 'setvalue' call, the text box clears itself out correctly but the subsequent 'getvalue' call returns the value prior to the input being set to empty string. The same holds true if I prefill a value, sleep for 5 seconds and clear out the field with my keyboard, then call 'getvalue' again; it retains the original value. Is this a bug? Attached recording of this happening.
  3. Is there some way to speed up _UIA_getObjectByFindAll()? See gif...it's taking nearly 2 seconds to identify each element I'm running the following code in a loop that identifies each of the checkboxes. The $subsection variable is as close as I can get to the direct parent of those elements when using simplespy. $element = _UIA_getObjectByFindAll($subsection, 'title:=' & $consultation_of.Keys[$i] & ';classname:=WindowsForms10.BUTTON.app.0.202c666', $treescope_subtree) Here's the simplespy output for the "Shoulder" checkbox:    https://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/?do=findComment&comment=1156373  At least we have an element title: [Shoulder] class: [WindowsForms10.BUTTON.app.0.202c666] Having the following values for all properties:  Title is: <Shoulder>    Class   := <WindowsForms10.BUTTON.app.0.202c666>    controltype:= <UIA_ButtonControlTypeId>    ,<50000>    , (0000C350)    1420;531;86;17 *** Parent Information top down *** 14: Title is: <Note Authoring>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_WindowControlTypeId>    ,<50032>    , (0000C370)    951;72;935;936 "Title:=Note Authoring;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     13: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    955;119;927;885 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     12: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    955;119;927;885 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     11: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    955;119;927;885 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     10: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    955;178;927;826 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     9: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    955;178;927;826 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     8: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_TabControlTypeId>    ,<50018>    , (0000C362)    965;188;907;806 "Title:=;controltype:=UIA_TabControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     7: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    966;209;905;784 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     6: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    966;209;905;784 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     5: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    966;209;905;784 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     4: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    1168;241;703;752 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     3: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    1168;274;703;585 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     2: Title is: <twNoteInputTemplate1>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    1168;274;703;585 "Title:=twNoteInputTemplate1;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     1: Title is: <History of Present Illness>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    1180;286;663;3007 "Title:=History of Present Illness;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     0: Title is: <>    Class   := <WindowsForms10.Window.8.app.0.202c666>    controltype:= <UIA_PaneControlTypeId>    ,<50033>    , (0000C371)    1190;312;643;2981 "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666""     ;~ *** Standard code maintainable *** #include "UIAWrappers.au3" AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("oP1","Title:=Note Authoring;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ;Note Authoring _UIA_setVar("oP2","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP3","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP4","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP5","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP6","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP7","Title:=;controltype:=UIA_TabControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP8","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP9","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP10","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP11","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP12","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("oP13","Title:=twNoteInputTemplate1;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ;twNoteInputTemplate1 _UIA_setVar("oP14","Title:=History of Present Illness;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ;History of Present Illness _UIA_setVar("oP15","Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666")    ; _UIA_setVar("Shoulder.mainwindow","title:=Shoulder;classname:=WindowsForms10.BUTTON.app.0.202c666") ;~ Actions split away from logical/technical definition above can come from configfiles  ;~_UIA_Action("oP1","highlight") _UIA_Action("oP1","setfocus") ;~_UIA_Action("oP2","highlight") _UIA_Action("oP2","setfocus") ;~_UIA_Action("oP3","highlight") _UIA_Action("oP3","setfocus") ;~_UIA_Action("oP4","highlight") _UIA_Action("oP4","setfocus") ;~_UIA_Action("oP5","highlight") _UIA_Action("oP5","setfocus") ;~_UIA_Action("oP6","highlight") _UIA_Action("oP6","setfocus") ;~_UIA_Action("oP7","highlight") _UIA_Action("oP7","setfocus") ;~_UIA_Action("oP8","highlight") _UIA_Action("oP8","setfocus") ;~_UIA_Action("oP9","highlight") _UIA_Action("oP9","setfocus") ;~_UIA_Action("oP10","highlight") _UIA_Action("oP10","setfocus") ;~_UIA_Action("oP11","highlight") _UIA_Action("oP11","setfocus") ;~_UIA_Action("oP12","highlight") _UIA_Action("oP12","setfocus") ;~_UIA_Action("oP13","highlight") _UIA_Action("oP13","setfocus") ;~_UIA_Action("oP14","highlight") _UIA_Action("oP14","setfocus") ;~_UIA_Action("oP15","highlight") _UIA_Action("oP15","setfocus") _UIA_action("Shoulder.mainwindow","setfocus") ;~ *** Standard code Flexible*** #include "UIAWrappers.au3" AutoItSetOption("MustDeclareVars", 1) Local $oP14=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=Note Authoring;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP14,"setfocus") Local $oP13=_UIA_getObjectByFindAll($oP14, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP13,"setfocus") Local $oP12=_UIA_getObjectByFindAll($oP13, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP12,"setfocus") Local $oP11=_UIA_getObjectByFindAll($oP12, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP11,"setfocus") Local $oP10=_UIA_getObjectByFindAll($oP11, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP10,"setfocus") Local $oP9=_UIA_getObjectByFindAll($oP10, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP9,"setfocus") Local $oP8=_UIA_getObjectByFindAll($oP9, "Title:=;controltype:=UIA_TabControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP8,"setfocus") Local $oP7=_UIA_getObjectByFindAll($oP8, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP7,"setfocus") Local $oP6=_UIA_getObjectByFindAll($oP7, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP6,"setfocus") Local $oP5=_UIA_getObjectByFindAll($oP6, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP5,"setfocus") Local $oP4=_UIA_getObjectByFindAll($oP5, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP4,"setfocus") Local $oP3=_UIA_getObjectByFindAll($oP4, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP3,"setfocus") Local $oP2=_UIA_getObjectByFindAll($oP3, "Title:=twNoteInputTemplate1;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP2,"setfocus") Local $oP1=_UIA_getObjectByFindAll($oP2, "Title:=History of Present Illness;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP1,"setfocus") Local $oP0=_UIA_getObjectByFindAll($oP1, "Title:=;controltype:=UIA_PaneControlTypeId;class:=WindowsForms10.Window.8.app.0.202c666", $treescope_children)     _UIA_Action($oP0,"setfocus") _UIA_setVar("Shoulder.mainwindow","title:=Shoulder;classname:=WindowsForms10.BUTTON.app.0.202c666") _UIA_action("Shoulder.mainwindow","setfocus") *** Detailed properties of the highlighted element *** UIA_title:= <Shoulder> UIA_text:= <Shoulder> UIA_regexptitle:= <Shoulder> UIA_class:= <WindowsForms10.BUTTON.app.0.202c666> UIA_regexpclass:= <WindowsForms10.BUTTON.app.0.202c666> UIA_iaccessiblechildId:= <0> UIA_id:= <TextFinding361> UIA_handle:= <788282> UIA_RuntimeId:= <42;788282> UIA_BoundingRectangle:= <1420;531;86;17> UIA_ProcessId:= <3392> UIA_ControlType:= <50000> UIA_LocalizedControlType:= <button> UIA_Name:= <Shoulder> UIA_HasKeyboardFocus:= <False> UIA_IsKeyboardFocusable:= <True> UIA_IsEnabled:= <True> UIA_AutomationId:= <TextFinding361> UIA_ClassName:= <WindowsForms10.BUTTON.app.0.202c666> UIA_Culture:= <0> UIA_IsControlElement:= <True> UIA_IsContentElement:= <True> UIA_IsPassword:= <False> UIA_NativeWindowHandle:= <788282> UIA_IsOffscreen:= <False> UIA_Orientation:= <0> UIA_FrameworkId:= <WinForm> UIA_IsRequiredForForm:= <False> UIA_IsDockPatternAvailable:= <False> UIA_IsExpandCollapsePatternAvailable:= <False> UIA_IsGridItemPatternAvailable:= <False> UIA_IsGridPatternAvailable:= <False> UIA_IsInvokePatternAvailable:= <True> UIA_IsMultipleViewPatternAvailable:= <False> UIA_IsRangeValuePatternAvailable:= <False> UIA_IsScrollPatternAvailable:= <False> UIA_IsScrollItemPatternAvailable:= <False> UIA_IsSelectionItemPatternAvailable:= <False> UIA_IsSelectionPatternAvailable:= <False> UIA_IsTablePatternAvailable:= <False> UIA_IsTableItemPatternAvailable:= <False> UIA_IsTextPatternAvailable:= <False> UIA_IsTogglePatternAvailable:= <False> UIA_IsTransformPatternAvailable:= <False> UIA_IsValuePatternAvailable:= <False> UIA_IsWindowPatternAvailable:= <False> UIA_ValueIsReadOnly:= <True> UIA_RangeValueValue:= <0> UIA_RangeValueIsReadOnly:= <True> UIA_RangeValueMinimum:= <0> UIA_RangeValueMaximum:= <0> UIA_RangeValueLargeChange:= <0> UIA_RangeValueSmallChange:= <0> UIA_ScrollHorizontalScrollPercent:= <0> UIA_ScrollHorizontalViewSize:= <100> UIA_ScrollVerticalScrollPercent:= <0> UIA_ScrollVerticalViewSize:= <100> UIA_ScrollHorizontallyScrollable:= <False> UIA_ScrollVerticallyScrollable:= <False> UIA_SelectionCanSelectMultiple:= <False> UIA_SelectionIsSelectionRequired:= <False> UIA_GridRowCount:= <0> UIA_GridColumnCount:= <0> UIA_GridItemRow:= <0> UIA_GridItemColumn:= <0> UIA_GridItemRowSpan:= <1> UIA_GridItemColumnSpan:= <1> UIA_DockDockPosition:= <5> UIA_ExpandCollapseExpandCollapseState:= <3> UIA_MultipleViewCurrentView:= <0> UIA_WindowCanMaximize:= <False> UIA_WindowCanMinimize:= <False> UIA_WindowWindowVisualState:= <0> UIA_WindowWindowInteractionState:= <0> UIA_WindowIsModal:= <False> UIA_WindowIsTopmost:= <False> UIA_SelectionItemIsSelected:= <False> UIA_TableRowOrColumnMajor:= <2> UIA_ToggleToggleState:= <2> UIA_TransformCanMove:= <False> UIA_TransformCanResize:= <False> UIA_TransformCanRotate:= <False> UIA_IsLegacyIAccessiblePatternAvailable:= <True> UIA_LegacyIAccessibleChildId:= <0> UIA_LegacyIAccessibleName:= <Shoulder> UIA_LegacyIAccessibleRole:= <43> UIA_LegacyIAccessibleState:= <1048576> UIA_LegacyIAccessibleDefaultAction:= <Press> UIA_IsDataValidForForm:= <False> UIA_ProviderDescription:= <[pid:21272,hwnd:0xC073A Main:Nested [pid:3392,hwnd:0xC073A Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]> UIA_IsItemContainerPatternAvailable:= <False> UIA_IsVirtualizedItemPatternAvailable:= <False> UIA_IsSynchronizedInputPatternAvailable:= <False>
×
×
  • Create New...