RadDropDownButton 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


    I was trying to make a simple UI-test (with NUnit framework), and my test needs to click on telerik RadDropDownButton on WPF window.
    When I click on this button using mouse, it works fine (I can see 'RadContextMenu' with 'RadMenuItem' items), but when my test doing this, RadContextMenu does not appear.

    Here is the part of Veiw.xaml file:

    <telerik:RadDropDownButton x:Name="btnDrop" AutomationProperties.AutomationId="btnDropMenu">
                        <telerik:RadContextMenu BorderThickness="0">
                                    <telerik:RadMenuItem Header="option1" Command="{StaticResource op1CommandReference}"/>
                                    <telerik:RadMenuItem Header="option2" Command="{StaticResource op2CommandReference}"/>
                                    <telerik:RadMenuItem Header="option3" Command="{StaticResource op3CommandReference}"/>

    This is my code:

    var button = win.Find.ByName<Telerik.WebAii.Controls.Xaml.RadDropDownButton>("btnDrop");

    There is no exception, test finds this button, but when I'm trying to find RadMenuItem, I get this exception (just because RadContextMenu does not appear):

    ArtOfTest.Common.Exceptions.FindElementException : Element Not found!

    How can I fix this?
  2. Peshito
    Peshito avatar
    493 posts

    Posted 27 Mar 2015 Link to this post

    Hi Evgeniy,

    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.


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

  3. DevCraft banner
Back to Top