However, I am not able to use the GetProperty method for control specific properties, i.e. "ItemState" on a RadTileViewItem. I am able to find the item and for example draw a highlight around it, but trying to get it's TileState results in a NotSupportedException:
GetProperty of "TileState" is not supported on control type: Custom
What seems strange: If I start the coded ui test builder and pull the crosshair over the TileViewItem, I can see it's TileState property and the correct value. Only the test playback is not able to retrieve it.
Am I missing something important to make the uitest extension working?
8 Answers, 1 is accepted
Adding to my last post, I am using Visual Studio 2015 and I have added the latest version of the dll to "%CommonProgramFiles(x86)%\Microsoft Shared\VSTT\14.0\UITestExtensionPackages". I also installed it to the GAC.
It seems that I can find Telerik controls using their type names from the extension (i.e. WpfRadTileView), but I can't read any non-standard properties from them. The control type is being identified as the standard-equivalent, like in this example WpfCustom. After installing the UITest extension, should it not be correctly identified?
We are currently looking into this issue and will write you back with more information on the matter.
Regards,
Peshito
Telerik
I used the other forum thread you have started to give you the required solution to this issue. This is the link to it. I am posting the same reply here for future references:
"I was able to reproduce the issue you have. However the reason why you get this error is because the element is not properly identified. In order to do so, please use the "HelpText" search property to help you with the identification. This is required for the CodedUI level 2 and 3 support.
For instance this is a sample test method using your own code as a start point:
[TestMethod]
public void CodedUITestMethod2()
{
this.UIMap.Start();
this.UIMap.Checks();
this.UIMap.HeightAsserts();
WpfWindow mainWindow = new WpfWindow();
mainWindow.SearchProperties[WpfControl.PropertyNames.Name] = "MainWindow";
WpfRadButton button1 = new WpfRadButton(mainWindow);
button1.SearchProperties["AutomationId"] = "Button_Test";
button1.SearchProperties["HelpText"] = "RadButton";
WpfRadButton button2 = new WpfRadButton(new UIMainWindowWindow());
button2.SearchProperties["AutomationId"] = "Button_Test2";
button2.SearchProperties["HelpText"] = "RadButton";
double height1 = button1.ActualHeight;
double height2 = button2.ActualHeight;
//this.UIMap.ChecksCustom();
this.UIMap.Close();
}
Regards,
Peshito
Telerik
Hi,
I have Visual Studio 2015. I don't have this file in this folder. Can you tell me please why ?
Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore
I use thins link to help ?
http://docs.telerik.com/devtools/wpf/coded-ui-support
The assembly with the Telerik CodedUI extensions is not automatically copied to the folder by the installer. You can find Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore in the folder that contains the Telerik binaries. Then it should be manually copied to the respective VS folder. You can find the folder paths for the different VS versions in the article that you mentioned.
Regards,
Ivan Ivanov
Telerik by Progress
Am using a WPF application which has Telerik Controls in it, when am trying to identify the objects, it doesn't, From this post, i can understand that we need Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore.dll. I have installed only the software which i need to test. Where can i find this dll in this case. I don't see this file in that installed directory of my software. A little detailed explanation would be much appreciated.
Have you checked the TestTools subfolder in Binaries. There you can find different versions of the dll according to the specific VS versions. Then you can follow the steps from the previously mentioned article.
Regards,
Ivan Ivanov
Progress Telerik