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

  • 相关阅读:
    html文本超出自动换行、显示省略号
    angular第三天
    angular第二天
    angular第一天
    jQuery基础:keydown( ) 与 keypress( ) 区别
    jQuery基础:mouseeter( ) 与 mouseover( ) 区别
    jQuery基础:remove()与 detach()区别
    jQuery基础:获取元素内容
    (一)数组或对象中最会一个属性是否该加逗号的测试
    jQuery基础:prop()与attr()的区别
  • 原文地址:https://www.cnblogs.com/kangyi/p/1569563.html
Copyright © 2011-2022 走看看