gpt4 book ai didi

wpf - 使用编码的 UI 测试 WPF 应用程序

转载 作者:行者123 更新时间:2023-11-28 20:54:27 25 4
gpt4 key购买 nike

我必须使用编码 UI 测试 WPF 应用程序并编辑了 CodedUITestBuilder.exe.config 文件以将 MaxLevelsForItemContainer 级别增加到 10,但这些更改没有反射(reflect)出来在 TestBuilder 本身。

最佳答案

你的问题听起来和这个一样bug already raised with Microsoft .

在那里,用户状态

I edited the MaxLevelsForItemContainer keys [...but] the CodedUIBuilder still uses the default MaxLevelsForItemContainer.

微软回答:

The behavior is expected per our design. MaxLevelsForItemContainer config is applied only on Item containers such as ListBox, ComboBox etc. The reason behind this is the items within it could be potentially virtualized during playback, so the recorder needs to capture the entire hierarchy during recording for it to de-virtualized each level and play back properly. In this scenario, there are only nested Groups (they do not have ItemContainerPattern support as to speak in UIA world). So the config does not apply for over.

The workaround over here is to handcode the test script to add all the nested controls in the search hierarchy.

关于wpf - 使用编码的 UI 测试 WPF 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31013433/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com