RadDropDownButton User.Click does not work

2 posts, 0 answers
  1. Evgeniy
    Evgeniy avatar
    8 posts
    Member since:
    Mar 2015

    Posted 26 Mar 2015 Link to this post

    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?
  2. Peshito
    Admin
    Peshito avatar
    496 posts

    Posted 27 Mar 2015 Link to this post

    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top