coded-ui-tests - 如何获取 CodedUI 中控件特定属性的值?

标签 coded-ui-tests

我有一个场景,其中我的某些代码部分取决于 TEXT 属性(控件特定类型属性)的值。

请提供有关如何获取 TEXT 属性值的帮助。

最佳答案

具有此属性(文本)的控件公开它,并且可以通过编程方式访问它, 例如:

WpfEdit editControl = new WpfEdit();
editControl .Text = " Some text";

或者:

string content = editControl .Text;

关于coded-ui-tests - 如何获取 CodedUI 中控件特定属性的值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31207049/

相关文章:

c# - 类库能否读取正在执行的编码 UI 测试的 app.config 文件?

testing - 如何为一个完整的页面构建UIMap,而不是记录某些 Action ?

c# - 在静态上下文中调用 C# 扩展方法是否有效?

visual-studio - 如何在Visual Studio测试运行器中排除某些测试?

c# - 如何使用 C# 和 Visual Studio 解决自动化 UI 测试中的计时问题?

c# - 编码 UI C# - 如何将捕获的图像上传到 Azure 存储容器

c# - 通过回滚 NUnit、Sql Server 和 UI 测试中的事务来维护数据库已知状态的正确方法

coded-ui-tests - CodedUI Visual Studio : How to wait for browser load

c# - 如何使用 UIMap Coded UI Test Builder 进行本地测试

visual-studio-2012 - 如何将值从 MTM 传递到数据驱动编码的 Ui 测试用例?