Hello.
I was writing UI-test for WPF application (using NUnit Framework and ArtOfTests), and in my test I need to click on RadDropDownButton:
<telerik:RadDropDownButton x:Name="btnDrop">
<telerik:RadDropDownButton.DropDownContent>
<telerik:RadContextMenu >
<telerik:RadMenuItem Header="op1" Command="{StaticResource op1CommandReference}"/>
<telerik:RadMenuItem Header="op2" Command="{StaticResource op2CommandReference}"/>
<telerik:RadMenuItem Header="op3" Command="{StaticResource op3CommandReference}"/>
</telerik:RadContextMenu>
</telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>
To click on this button, I use the following code:
var button = win.Find.ByName<Telerik.WebAii.Controls.Xaml.RadDropDownButton>("btnDrop");
button.User.Click(MouseClickType.LeftClick);
The test works fine (no exception have been thrown), but RadContextMenu does not appear.
When I click on this button using mouse, I can see this menu with 3 RadMenuItem items.
How can I solve this problem?
I was writing UI-test for WPF application (using NUnit Framework and ArtOfTests), and in my test I need to click on RadDropDownButton:
<telerik:RadDropDownButton x:Name="btnDrop">
<telerik:RadDropDownButton.DropDownContent>
<telerik:RadContextMenu >
<telerik:RadMenuItem Header="op1" Command="{StaticResource op1CommandReference}"/>
<telerik:RadMenuItem Header="op2" Command="{StaticResource op2CommandReference}"/>
<telerik:RadMenuItem Header="op3" Command="{StaticResource op3CommandReference}"/>
</telerik:RadContextMenu>
</telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>
To click on this button, I use the following code:
var button = win.Find.ByName<Telerik.WebAii.Controls.Xaml.RadDropDownButton>("btnDrop");
button.User.Click(MouseClickType.LeftClick);
The test works fine (no exception have been thrown), but RadContextMenu does not appear.
When I click on this button using mouse, I can see this menu with 3 RadMenuItem items.
How can I solve this problem?