Hi,
Our application has third party controls like Infragistics and Syncfusion.
Iam working on XamTabControls from Infragistics.
I could learn the wpfCustom and could perform a click on that control,But when I start dragging the image that is present on the hierarchical tab Page it fails.
with the following error :
Test method TestProject10.CodedUITest1.TestMethod2 threw exception: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details: TechnologyName: 'UIA' ControlType: 'Image' AutomationId: 'VariableReference_Content' ClassName: 'Uia.Image' Search may have failed at 'ClientArea' TabList as it may have virtualized children. If the control being searched is descendant of 'ClientArea' TabList then including it as the parent container may solve the problem. ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
Here is my code :
WpfWindow mainWindow = new WpfWindow();
mainWindow.SearchProperties[
WpfWindow.PropertyNames.Name] = "NextGen Simulation v0.0.0.1";
WpfCustom tabViewCustom = new WpfCustom(mainWindow);
tabViewCustom.SearchProperties[
WpfCustom.PropertyNames.AutomationId] = "TabView";
WpfCustom.PropertyNames.ClassName] = "Uia.PaneInstance";
WpfTabList clientareatabList = new WpfTabList(tabViewCustom);
clientareatabList.SearchProperties[
WpfTabList.PropertyNames.AutomationId] = "ClientArea";
WpfTabList.PropertyNames.ClassName] = "Uia.TabControl";
WpfTabPage archestraTabpage = new WpfTabPage(clientareatabList);
archestraTabpage.SearchProperties[
WpfTabPage.PropertyNames.Name]="ArchestrA.Visualization.ViewApplication.LayoutManagement.DisplayInstance";
WpfCustom tabViewCustom1 = new WpfCustom(archestraTabpage);
tabViewCustom1.SearchProperties[
WpfCustom.PropertyNames.ClassName] = "Uia.TabView";
WpfCustom dockCustom = new WpfCustom(tabViewCustom1);
dockCustom.SearchProperties[
WpfCustom.PropertyNames.AutomationId] = "dockManager";
WpfCustom.PropertyNames.ClassName] = "Uia.XamDockManager";
WpfCustom spliPane = new WpfCustom(dockCustom);
spliPane.SearchProperties[
WpfCustom.PropertyNames.AutomationId] = "Zf202f207e7fe4fabb4e5387bd6c37231";
WpfCustom.PropertyNames.ClassName] = "Uia.SplitPane";
WpfCustom modelLibrary = new WpfCustom(spliPane);
modelLibrary.SearchProperties[
WpfCustom.PropertyNames.AutomationId] = "ModelLibrary";
WpfCustom.PropertyNames.ClassName] = "Uia.ContentPane";
WpfCustom itemCustom = new WpfCustom(modelLibrary);
itemCustom.SearchProperties[
WpfCustom.PropertyNames.ClassName] = "Uia.LibraryView";
WpfCustom itemCustom1 = new WpfCustom(itemCustom);
itemCustom1.SearchProperties[
WpfTabList tabctrltabList = new WpfTabList(itemCustom1);
tabctrltabList.SearchProperties[
WpfTabList.PropertyNames.AutomationId]="Tabctrl";
WpfTabList.PropertyNames.ClassName]="Uia.XamTabControl";
WpfTabPage SimSciTabPage = new WpfTabPage(tabctrltabList);
SimSciTabPage.SearchProperties[
WpfTabList.PropertyNames.ClassName] = "Uia.TabItem";
WpfTabList.PropertyNames.Name] = "SimSci";
Mouse.Click(new Point(130, 380));
WpfImage Compressorimage = new WpfImage(SimSciTabPage);
Compressorimage.SearchProperties[
WpfTabList.PropertyNames.AutomationId] = "Valve";
WpfTabList.PropertyNames.ClassName] = "Uia.Image";
int x = Compressorimage.BoundingRectangle.Location.X + Compressorimage.BoundingRectangle.Width / 2;
int y = Compressorimage.BoundingRectangle.Location.Y + Compressorimage.BoundingRectangle.Height / 2;
Mouse.Click(new Point(x, y));
Compressorimage.DrawHighlight();
Playback.Wait(500);
//It fails here ..
Mouse.StartDragging(Compressorimage, new Point(x, y), MouseButtons.Left, ModifierKeys.None);
My query:
Does the infragistics controls like "XamDataGrid"," XamTabControls","XamDataGrid" support CodedUI Automation ??And to what extent??
If not is there a work around to do a drag and drop using Mouse.StartDragging(),Mouse.StopDragging??
Noted following link shwoing Page Not Found.
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=36847
Please share if there is any alternate path to download hotfix for KB2544407
regards
tehlikesunflower
HI,
Please let me know if you need further assistance regarding this case.
Sincerely Matt Developer Support Engineer