【异常报告】(1.24.9) The requested property 'ControlType [#30003]' is not supported

异常报告 · 1226 次浏览
wordpure 创建于 2021-05-06 02:48

Quicker 版本 1.24.9,使用新模块「窗口界面控制(FlaUI)」获取 Firefox 网页元素的 Xpath 时,Quicker 运行异常。

测试了几次,发现该模块可以正常获取 Firefox 标题栏、工具栏和菜单栏的控件信息,但只要尝试获取网页元素信息,无论该元素是文本、图像还是按钮,Quicker 都会运行异常。

似乎只有 Firefox 会发生这种状况,在新版 Edge 和 IE 浏览器使用该模块时,可以正常获取网页元素信息。

另外,软件 FlaUInspect、旧模块「窗口界面控制」,可以正常获取 Firefox 网页元素信息。

调试信息如下。

PropertyNotSupportedException
   在 FlaUI.Core.FrameworkAutomationElementBase.GetPropertyValue[T](PropertyId property)
   在 FlaUI.Core.Debug.<>c__DisplayClass1_0.<GetXPathToElement>b__0(ConditionFactory cf)
   在 FlaUI.Core.AutomationElements.AutomationElement.FindAllChildren(Func`2 conditionFunc)
   在 FlaUI.Core.Debug.GetXPathToElement(AutomationElement element, ITreeWalker treeWalker, AutomationElement rootElement)
   在 FlaUI.Core.Debug.GetXPathToElement(AutomationElement element, ITreeWalker treeWalker, AutomationElement rootElement)
   在 FlaUI.Core.Debug.GetXPathToElement(AutomationElement element, ITreeWalker treeWalker, AutomationElement rootElement)
   在 FlaUI.Core.Debug.GetXPathToElement(AutomationElement element, ITreeWalker treeWalker, AutomationElement rootElement)
   在 FlaUI.Core.Debug.GetXPathToElement(AutomationElement element, ITreeWalker treeWalker, AutomationElement rootElement)
   在 FlaUI.Core.Debug.GetXPathToElement(AutomationElement element, ITreeWalker treeWalker, AutomationElement rootElement)
   在 FlaUI.Core.Debug.GetXPathToElement(AutomationElement element, ITreeWalker treeWalker, AutomationElement rootElement)
   在 Quicker.Modules.TextTools.Tools.ControlSelectTool.<>c__DisplayClass1_0.<OnMouseUp>b__1()
   在 Quicker.Utilities.AppHelper.RunOnUiThread(Boolean waiteToComplete, Action acton, DispatcherPriority dispatcherPriority)
   在 Quicker.Modules.TextTools.Tools.ControlSelectTool.<OnMouseUp>d__1.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

wordpure 最后更新于 2021/5/6

回复内容
CL 2021-05-06 07:34
#1

感谢反馈。

这个似乎是因为某些元素不支持ControlType信息,而生成xpath需要这个信息造成的。我加个异常捕捉。

查了下,是控件层级中有一个不支持。在FlaUInspect中,firefox网页内容也得不到xpath。


CL 最后更新于 2021-05-06 08:12
回复主贴