zoukankan      html  css  js  c++  java
  • 使用UI Automation实现自动化测试4.6.1 (SelectionItemPattern)

    SelectionItemPattern

    支持SelectionItemPattern的控件有ListViewListBoxRadioButtonGridView等。

    1.         SelectionItemPattern的三个重要方法:

    1.         AddToSelection:将当前元素添加到所选项的集合。

    2.         RemoveFromSelection: 从选定项的集合中移除当前元素。

    3.         Select: 取消所有已选中的项,然后选择当前元素。

    2.         SelectionItemPatternCurrent属性
    可通过Current属性的IsSelected属性来判断AutomationElement是否被selected.

         如下代码演示了使用SelectionItemPattern来操作RadioButton控件。

    Code

         以下代码为XAML

    Code

        本文简单介绍了SelectionItemPattern以及使用SelectionItemPattern来操作RadioButton

  • 相关阅读:
    <转载>asp.net中向数据库中插入数据时如何获得当前插入行的主键?
    <转载>HTML实体字符
    以当前系统默认的编码写入文件
    <转载>SQL Server 数据库 执行命令(方法 2:带参数的 SQL 命令)
    Windows7无法访问Windows2003共享的解决方案
    MVC Music Store 在线音乐商店示例分析(12)StoreManagerController
    MVC Music Store 在线音乐商店示例分析(6)ShoppingCart
    MVC Music Store 在线音乐商店示例分析(10)ShoppingCartController
    MVC Music Store 在线音乐商店示例分析(3)Album
    MVC Music Store 在线音乐商店示例分析(9)HomeController
  • 原文地址:https://www.cnblogs.com/kangyi/p/1569563.html
Copyright © 2011-2022 走看看