This is a migrated thread and some comments may be shown as answers.

RadDropDownButton User.Click does not work

1 Answer 98 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Evgeniy
Top achievements
Rank 1
Evgeniy asked on 26 Mar 2015, 01:10 PM
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?

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 27 Mar 2015, 07:39 AM
Hello,

Thank you for your question.

Please find my answer in the other forum thread you have started.

I am posting a reference link below so others can find it.
http://www.telerik.com/forums/raddropdownbutton-user-click-does-not-work-ac1c09d1383c


Regards,
Peshito
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Buttons
Asked by
Evgeniy
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or