Feature: UiRecorder - Performance w/o UiXPathLib + POC Playback
I've leveraged WinAppDriver for an internal solution yet it lacked the ability of playing back the recording that was just made. Here is a branch for anyone looking for a proof of concept.
https://github.com/clintmasden/WinAppDriver/tree/poc.PlaybackImplementation
Also WinAppDriver team take a look of the refactored version w/o UiXPathLib in regards to performance.
https://github.com/clintmasden/WinAppDriver/blob/poc.PlaybackImplementation/WinAppDriver.Solution/WinAppDriver.Generation/Events/Hook/HookEventHandler.cs line 185
var uiAutomationElementWindows = uiAutomationElement.GetElementWindows();
Hi @clintmasden
Can you provide information on the feature you implemented? Do you have any samples showcasing perf. improvements?
@hassanuz Performance UiXPath Breakdown [TotalMilliseconds]
This is based on the latest pull from WinAppDriver/Tools/UiRecorder.
WinAppDriverUiRecorder - MouseKeyboardEventHandler.cs - 151
NativeMethods.GetUiXPath(ptUiWalking.X, ptUiWalking.Y, sb, sb.Capacity);
WordPad - Rich Text Window - 445.7127~ WordPad - Bold - 365.9042~ WordPad - View - Zoom In - 303.5201~
This is based on my last commit in poc.PlaybackImplementation.
WinAppDriver.Generation - HookEventHandler.cs - 180 / 187
var uiAutomationElement = UiAutomationCom.GetUiElementFromPoint(currentPosition);
var uiElement = uiAutomationElement.GetUiElementByIUIAutomationElement();
WordPad - Rich Text Window - 4.9927~ WordPad - Bold - 7.0023~ WordPad - View - Zoom In - 6.7872~
var uiAutomationElementWindows = uiAutomationElement.GetElementWindows();
WordPad - Rich Text Window - 1.1307~ WordPad - Bold - 1.9927~ WordPad - View - Zoom In - 6.4347~
Total
WordPad - Rich Text Window - 13.005~ WordPad - Bold - 18.011~ WordPad - View - Zoom In - 13.0032~