Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Asserting on RadComboItem's tooltip is not working as expected.

$
0
0
I tried getting tooltip value from comboitems using AutomationElement, it is giving 'RadComboBoxItem' as value of tooltip in all cases irrespectivie of value in tooltip. 

    Here is the sample application code:

<telerik:RadComboBox Height="17" HorizontalAlignment="Left" Margin="260,84,0,0" Name="StaticComboCtrl" VerticalAlignment="Top" Width="156" ItemsSource="{Binding}" RenderTransformOrigin="0.494,-1.5">
                        <telerik:RadComboBoxItem AutomationProperties.HelpText="ItemOne" ToolTip="ItemOne">Item1</telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem AutomationProperties.HelpText="ItemTwo" ToolTip="ItemTwo">Item2</telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem AutomationProperties.HelpText="ItemThree" ToolTip="ItemThree">Item3</telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem AutomationProperties.HelpText="ItemFour" ToolTip="ItemFour">Item4</telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem AutomationProperties.HelpText="ItemFive" ToolTip="ItemFive">Item5</telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem AutomationProperties.HelpText="ItemSix" ToolTip="ItemSix">Item6</telerik:RadComboBoxItem>
                    </telerik:RadComboBox>



Below is the code which gets autiomation element from point and gets "HelpText" property from that control. 

                System.Windows.Automation.AutomationElement testControl = AutomationElement.FromPoint(LocationOfTheCombItem or mouse position); 

                testing = testControl.Current.HelpText;



Here variable testing is always populated with value "RabComboBoxItem" but not actual value. 



Any help would be highly appreciated in this regards. 




Viewing all articles
Browse latest Browse all 84751


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>