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

  • 相关阅读:
    我的python中级班学习之路(全程笔记第一模块) (第一章)语言基础
    Python_常用模块
    Python_装饰器、迭代器、生成器
    Python_函数
    Python_深浅拷贝
    Python_文件操作
    Python_三级目录
    Python_循环判断表达式
    Python_基础语法
    7段数码管绘制
  • 原文地址:https://www.cnblogs.com/kangyi/p/1569563.html
Copyright © 2011-2022 走看看