以下代码为XAML:
Code
1<Window x:Class="WpfApp.Window1" 2 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation 3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4 Title="Window1" Height="219" Width="353"> 5 <Grid> 6 <RadioButton Height="16" HorizontalAlignment="Right" Margin="0,46,10,0" Name="radioButton1" VerticalAlignment="Top" Width="120">RadioButton</RadioButton> 7 </Grid> 8</Window> 9 |
本文简单介绍了SelectionItemPattern以及使用SelectionItemPattern来操作RadioButton。
相关阅读:
使用UI Automation实现自动化测试(4.1)——DockPattern
使用UI Automation实现自动化测试(4.2)——ExpandCollapsePattern
使用UI Automation实现自动化测试(4.3)——InvokePattern