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

How to find RadButton by Content or tooltip

1 Answer 17 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Olga
Top achievements
Rank 1
Olga asked on 29 Aug 2016, 05:01 PM

Hi,

i use telerik framework and visual studio 2015 to create automation tests for Silverlight application.

On UI Page i have RadButton. But it does not have properties Name. How can i verify that this Button exists on page? 

How i can find it?

I try to do smth like this RadButton rButton = NMOapp.Find.......

<telerik:RadButton Grid.Column="0"
 HorizontalAlignment="Left"
 Command="{Binding ResetResultCommand, Mode=OneWay}"
 Content="{Binding ControlCaptions.ClearFields_Label, Source={StaticResource ResourceWrapper}}"
 ToolTipService.ToolTip="{Binding ControlCaptions.ClearPositionReportsSearchFields_Tooltip, Source={StaticResource ResourceWrapper}}" />

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 31 Aug 2016, 10:22 AM
Hi Olga,

Please take a look at this article in order to get started with Telerik Testing Framework.

For example:
RadButton button = app.Find.ByType<RadButton>();
or
RadButton button = app.Find.ByName<RadButton>("<your_button_name");
where app is a SilverlightApp instance.

Hope this helps you get started.

Regards,
Peshito
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Buttons
Asked by
Olga
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or