public void ChangeLayoutItemsSizeViaSplitterTest() { using (new LayoutTestInitializer()) { this.LayoutControlUIMap.SwitchToItemsVisibilityDemoModule(); DXTestControl pictureLeft = UILayoutControlMap.UIXtraLayoutFeaturesDeWindow3.UIPanelControl1Client.UIGcContainerClient.UIItemsVisibilityCustom.UILayoutControl1Custom.UILayoutControlGroup1LayoutGroup.UIPicture1ItemLayoutControlItem.UIPictureEdit2Image; DXTestControl pictureRight = UILayoutControlMap.UIXtraLayoutFeaturesDeWindow3.UIPanelControl1Client.UIGcContainerClient.UIItemsVisibilityCustom.UILayoutControl1Custom.UILayoutControlGroup1LayoutGroup.UIPicture2ItemLayoutControlItem.UIPictureEdit1Image; DXTextEdit memo = UILayoutControlMap.UIXtraLayoutFeaturesDeWindow3.UIPanelControl1Client.UIGcContainerClient.UIItemsVisibilityCustom.UILayoutControl1Custom.UILayoutControlGroup1LayoutGroup.UIDescriptionItemLayoutControlItem.UIMemoEdit1Edit; Size oldLeftPictureSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)pictureLeft.GetProperty("Size"), typeof(Size).FullName); Size oldRightPictureSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)pictureRight.GetProperty("Size"), typeof(Size).FullName); this.LayoutControlUIMap.MoveHorizontalSplitterToLeft(); Size newLeftPictureSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)pictureLeft.GetProperty("Size"), typeof(Size).FullName); Size newRightPictureSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)pictureRight.GetProperty("Size"), typeof(Size).FullName); Size oldBottomMemoEditSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)memo.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newLeftPictureSize.Width < oldLeftPictureSize.Width); Assert.IsTrue(newRightPictureSize.Width > oldRightPictureSize.Width); Assert.AreEqual(newLeftPictureSize.Height, oldLeftPictureSize.Height); Assert.AreEqual(newRightPictureSize.Height, oldRightPictureSize.Height); this.LayoutControlUIMap.MoveVerticalSplitterToBottom(); Size newBottomMemoEditSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)memo.GetProperty("Size"), typeof(Size).FullName); newLeftPictureSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)pictureLeft.GetProperty("Size"), typeof(Size).FullName); newRightPictureSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)pictureRight.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newBottomMemoEditSize.Height < oldBottomMemoEditSize.Height); Assert.IsTrue(newLeftPictureSize.Height > oldLeftPictureSize.Height); Assert.IsTrue(newRightPictureSize.Height > oldRightPictureSize.Height); } }
void SwitchToDemoModule(string groupName, string moduleName) { DXTestControl accordionControl = this.UIMap.UIApplicationUIWindow1.UIGcNavigationsClient.UINavBarControl1NavBar; DXTestControl accordionControlGroup = new DXTestControl(accordionControl); accordionControlGroup.SearchProperties[DXTestControl.PropertyNames.Name] = groupName; accordionControlGroup.SearchProperties[DXTestControl.PropertyNames.ClassName] = "AccordionControlGroup"; DXTestControl accordionControlItem = new DXTestControl(accordionControlGroup); accordionControlItem.SearchProperties[DXTestControl.PropertyNames.Name] = moduleName; accordionControlItem.SearchProperties[DXTestControl.PropertyNames.ClassName] = "AccordionControlItem"; if (!accordionControlItem.Exists) { foreach (string postfix in ModuleNamePostfixes) { accordionControlItem.SearchProperties[DXTestControl.PropertyNames.Name] = moduleName + postfix; if (accordionControlItem.Exists) { break; } } } Mouse.Click(accordionControlItem); if (moduleName == TabbedDocumentsModuleName) { SetRequiredWindowSizeForTabbedDocumentsDemoModule(); } else if (moduleName == DockingUIIntegrationModuleName) { SetRequiredWindowSizeForDockingUIIntegrationDemoModule(); } }
public void ClickDropDownButtonTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MultipleDocumentsUIGroup, DockingUIIntegrationModuleName); this.UIDockingMap.ClickDocumentManagerDropDownButton(); DXTestControl document2 = this.UIDockingMap.UIApplicationUILayoutCWindow.UIPanelControl1Client.UIGcContainerClient.UIDocumentManagerDockiCustom.UIDocumentsHostTabList.UIDocument2TabPage; Assert.IsTrue(document2.Visible); } }
public void CloseDocumentFormViaCloseButtonClickTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MultipleDocumentsUIGroup, DockingUIIntegrationModuleName); this.UIDockingMap.CloseDocumentFormViaClickCloseButton(); DXTestControl document0 = this.UIDockingMap.UIApplicationUILayoutCWindow.UIPanelControl1Client.UIGcContainerClient.UIDocumentManagerDockiCustom.UIDocumentsHostTabList.UIDocument0TabPage; Assert.IsFalse(document0.Exists); } }
public void ClosePanelContainerViaContextMenuOptionTest() { using (new DockingDemoTestInitializer()) { DXTestControl uIMdiClientTabList = UIDockingMap.UIDockingDemoCDemoWindow9.UIMdiClientTabList; Size oldListSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIMdiClientTabList.GetProperty("Size"), typeof(Size).FullName); this.UIDockingMap.ClosePanelContainerViaContextMenuOption(); Size newListSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIMdiClientTabList.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newListSize.Width > oldListSize.Width); } }
public void MoveVerticalSplitterTest() { using (new DockingDemoTestInitializer()) { DXTestControl uIDockPanel3Client = UIDockingMap.UIDockingDemoCDemoWindow.UIPanelContainer2Client.UIDockPanel3Client; Size oldSizePanel = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIDockPanel3Client.GetProperty("Size"), typeof(Size).FullName); this.UIDockingMap.MoveVerticalSplitterDown(); Size newSizePanel = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIDockPanel3Client.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newSizePanel.Height < oldSizePanel.Height); } }
public void ChangeTabbedViewHeaderLocationTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MultipleDocumentsUIGroup, TabbedDocumentsModuleName); DXTestControl uIDocument4TabPage = UIDockingMap.UIApplicationUILayoutCWindow2.UIPanelControl1Client.UIGcContainerClient.UIDocumentManagerTabbeCustom.UIDocumentsHostTabList.UIDocument4TabPage; Point oldLocation = DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString <Point>((string)uIDocument4TabPage.GetProperty("Location")); this.UIDockingMap.ChangeTabbedViewHeaderLocation(); Point newLocation = DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString <Point>((string)uIDocument4TabPage.GetProperty("Location")); Assert.IsTrue(newLocation.Y > oldLocation.Y); } }
public void ChangeTabbedViewHeaderOrientationTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MultipleDocumentsUIGroup, TabbedDocumentsModuleName); DXTestControl uIDocument4TabPage = UIDockingMap.UIApplicationUILayoutCWindow2.UIPanelControl1Client.UIGcContainerClient.UIDocumentManagerTabbeCustom.UIDocumentsHostTabList.UIDocument4TabPage; Size oldHeaderSize = DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString <Size>((string)uIDocument4TabPage.GetProperty("Size")); this.UIDockingMap.ChangeTabbedViewHeaderOrientation(); Size newHeaderSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString <Size>((string)uIDocument4TabPage.GetProperty("Size")); Assert.IsTrue(newHeaderSize.Width <oldHeaderSize.Width && newHeaderSize.Height> oldHeaderSize.Height); } }
public void MoveHorizontalSplitterTest() { using (new DockingDemoTestInitializer()) { this.UIDockingMap.MakeHorizontalSplitContainerViaDockPanelToRightEdgeOfDocumentForm(); DXTestControl uIDockPanel3Client = UIDockingMap.UIDockingDemoCDemoWindow.UIPanelContainer2Client.UIDockPanel3Client; Size oldSizePanel = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIDockPanel3Client.GetProperty("Size"), typeof(Size).FullName); this.UIDockingMap.MoveHorizontalSplitter(); Size newSizePanel = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIDockPanel3Client.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newSizePanel.Width < oldSizePanel.Width); } }
public void MaximizePanelViaMaximizeButtonTest() { using (new DockingDemoTestInitializer()) { this.UIDockingMap.MakePanelFloatViaDoubleClickPanelCaption(); DXTestControl uIPanelContainer2Client = UIDockingMap.UIItemWindow.UIPanelContainer2Window.UIPanelContainer2Client; Size oldPanelSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIPanelContainer2Client.GetProperty("Size"), typeof(Size).FullName); this.UIDockingMap.ClickPanelMaximizeButton(); Size newPanelSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIPanelContainer2Client.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newPanelSize.Width > oldPanelSize.Width && newPanelSize.Height > oldPanelSize.Height); } }
public void MinimizeRibbonTestViaCtrlF1ShortcutTest() { using (new RibbonSimplePadTestInitializer()) { this.UIMap.SetOffice2013ThemeForRibbonSimplePad(); DXTestControl uIRibbonControl1Ribbon = UIMap.UINewDocument1RibbonSiWindow.UIRibbonControl1Ribbon; Size oldSizeRibbonControl = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIRibbonControl1Ribbon.GetProperty("Size"), typeof(Size).FullName); this.UIMap.MinimizeRibbonViaCtrlF1Shortcut(); Size newSizeRibbonControl = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIRibbonControl1Ribbon.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newSizeRibbonControl.Height < oldSizeRibbonControl.Height); } }
public void MinimizeRibbonViaExpandCollapseButtonTest() { using (new RibbonSimplePadTestInitializer()) { this.UIMap.SwitchToOffice2010RibbonStyle(); DXTestControl uIRibbonControl1Ribbon = UIMap.UINewDocument1RibbonSiWindow.UIRibbonControl1Ribbon; Size oldSizeRibbonControl = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIRibbonControl1Ribbon.GetProperty("Size"), typeof(Size).FullName); this.UIMap.MinimizeRibbonViaExpandCollapseButton(); Size newSizeRibbonControl = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIRibbonControl1Ribbon.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newSizeRibbonControl.Height < oldSizeRibbonControl.Height); } }
public void ShowRibbonQuickAccessToolbarBelowRibbonTest() { using (new RibbonSimplePadTestInitializer()) { this.UIMap.SetOffice2013ThemeForRibbonSimplePad(); DXTestControl uIRibbonQuickAccessToolRibbonBar = UIMap.UINewDocument1RibbonSiWindow.UIRibbonControl1Ribbon.UIRibbonQuickAccessTooRibbonBar; Size oldLocationRibbonQuickAccessToolBar = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIRibbonQuickAccessToolRibbonBar.GetProperty("Location"), typeof(Size).FullName); this.UIMap.ShowRibbonQuickAccessToolbarBelowRibbon(); Size newLocationRibbonQuickAccessToolBar = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIRibbonQuickAccessToolRibbonBar.GetProperty("Location"), typeof(Size).FullName); Assert.IsTrue(newLocationRibbonQuickAccessToolBar.Height > oldLocationRibbonQuickAccessToolBar.Height); } }
public void ChangeTabbedMDIHeaderOrientationTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MDIGroupName, TabbedMDIModuleName); this.UIDockingMap.ClickLaunchSampleButtonInTabbedMDIDemoModule(); DXTestControl uIForm2TabPage = UIDockingMap.UITabbedMDICcodeWindow.UIMdiClientTabList.UIForm2TabPage; Size oldHeaderSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIForm2TabPage.GetProperty("Size"), typeof(Size).FullName); this.UIDockingMap.ChangeTabbedMDIHeaderOrientation(); Size newHeaderSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIForm2TabPage.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newHeaderSize.Width <oldHeaderSize.Width && newHeaderSize.Height> oldHeaderSize.Height); } }
public void MoveCategoryDownViaCustomizationFormTest() { using (new RibbonSimplePadTestInitializer()) { this.UIMap.SetOffice2013ThemeForRibbonSimplePad(); DXTestControl uIRibbonPage2RibbonPage = UIMap.UINewDocument1RibbonSiWindow.UIRibbonControl1Ribbon1.UIRibbonPage2RibbonPage; Size oldLocationRibbonPage = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIRibbonPage2RibbonPage.GetProperty("Location"), typeof(Size).FullName); this.UIMap.ClickRibbonCustomizationFormDownButton(); this.UIMap.ClickCustomizationFormOkButton(); Size newLocationRibbonPage = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIRibbonPage2RibbonPage.GetProperty("Location"), typeof(Size).FullName); Assert.IsTrue(newLocationRibbonPage.Width > oldLocationRibbonPage.Width); } }
public void SwitchOnHeaderAutoFillOptionTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MDIGroupName, TabbedMDIModuleName); this.UIDockingMap.ClickLaunchSampleButtonInTabbedMDIDemoModule(); DXTestControl uIForm2TabPage = UIDockingMap.UITabbedMDICcodeWindow.UIMdiClientTabList.UIForm2TabPage; Size oldHeaderLocation = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIForm2TabPage.GetProperty("Location"), typeof(Size).FullName); this.UIDockingMap.MakeHeaderAutoFillBarVisible(); this.UIDockingMap.SwitchOnHeaderAutoFillOption(); Size newHeaderLocation = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIForm2TabPage.GetProperty("Location"), typeof(Size).FullName); Assert.IsTrue(newHeaderLocation.Width > oldHeaderLocation.Width); } }
public void MaximizeMinimizeDocumentFormTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MultipleDocumentsUIGroup, NativeDocumentsModuleName); DXTestControl document4Container = UIDockingMap.UIApplicationUILayoutCWindow1.UIPanelControl1Client.UIGcContainerClient.UIDocumentManagerNativCustom.UIDocumentsHostTabList.UIDocument4Custom; Size beforeMaximize = DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString <Size>((string)document4Container.GetProperty("Size")); this.UIDockingMap.ClickDocumentFormMaximizeButton(); Size afterMaximize = DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString <Size>((string)document4Container.GetProperty("Size")); this.UIDockingMap.ClickDocumentFormMinimizeButton(); Size afterMinimize = DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString <Size>((string)document4Container.GetProperty("Size")); Assert.IsTrue(beforeMaximize.Width < afterMaximize.Width && beforeMaximize.Height < afterMaximize.Height); Assert.IsTrue(afterMaximize.Width > afterMinimize.Width && afterMaximize.Height > afterMinimize.Height); } }
public void DragAlertFormTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MultiPurposeComponentsGroupName, AlertControlModuleName); this.UIMap.ClickShowAlertFormButton(); this.UIMap.ClickAlertControlPinButton(); DXTestControl uIAlertFormWindow = UIMap.UIItemWindow2.UIAlertFormWindow; Size oldLocation = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIAlertFormWindow.GetProperty("Location"), typeof(Size).FullName); this.UIMap.DragAndDropAlertForm(); Size newLocation = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIAlertFormWindow.GetProperty("Location"), typeof(Size).FullName); Assert.IsTrue(newLocation.Height < oldLocation.Height && newLocation.Width < oldLocation.Width); } }
public void ScrollTabViaTabButtonsClickTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MultipleDocumentsUIGroup, DockingUIIntegrationModuleName); DXTestControl document0 = this.UIDockingMap.UIApplicationUILayoutCWindow.UIPanelControl1Client.UIGcContainerClient.UIDocumentManagerDockiCustom.UIDocumentsHostTabList.UIDocument0TabPage; DXTestControl document2 = this.UIDockingMap.UIApplicationUILayoutCWindow.UIPanelControl1Client.UIGcContainerClient.UIDocumentManagerDockiCustom.UIDocumentsHostTabList.UIDocument2TabPage; this.UIDockingMap.ClickDocumentManagerTabNextButton(); this.UIDockingMap.ClickDocumentManagerTabNextButton(); Assert.IsTrue(document2.Visible); Assert.IsFalse(document0.Visible); this.UIDockingMap.ClickDocumentManagerTabPreviousButton(); this.UIDockingMap.ClickDocumentManagerTabPreviousButton(); Assert.IsTrue(document0.Visible); } }
public void ClickRibbonQuickAccessToolbarDoubleArrowButtonTest() { using (new RibbonSimplePadTestInitializer()) { this.UIMap.SetOffice2013ThemeForRibbonSimplePad(); this.UIMap.TypeInRibbonRichTextBox(); this.UIMap.SelectionRibbonRichEditTextViaMouseAndCopyViaCtrlCShortcut(); this.UIMap.AddRibbonItemToQuickAccessToolbarForAssertionQuickAccessToolbarRightPointingDoubleArrowButton(); int requiredWidth = 400; int windowWidth = UIMap.UINewDocument1RibbonSiWindow11.BoundingRectangle.Width; DXTestControl sizeGrip = UIMap.UINewDocument1RibbonSiWindow11.UIRibbonStatusBar1MenuBar.UISizeGripCustom; Mouse.StartDragging(sizeGrip, new Point(10, 10)); Mouse.StopDragging(sizeGrip, requiredWidth - windowWidth, 0); this.UIMap.ClickQuickAccessToolbarItemViaRightPointingDoubleArrowButton(); CheckRichTextBoxText("testtest"); } }
public void ChangeAlertFormSizeAndShowAlertFormTest() { using (new ApplicationUITestInitializer()) { this.SwitchToDemoModule(MultiPurposeComponentsGroupName, AlertControlModuleName); this.UIMap.ClickShowAlertFormButton(); this.UIMap.ClickAlertControlPinButton(); DXTestControl uIAlertFormWindow = UIMap.UIItemWindow2.UIAlertFormWindow; Size oldSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIAlertFormWindow.GetProperty("Size"), typeof(Size).FullName); this.UIMap.ClickAlertControlCloseButton(); this.UIMap.ChangeAlertFormSize(); this.UIMap.ClickShowAlertFormButton(); this.UIMap.ClickAlertControlPinButton(); DXTestControl uIAlertFormWindowNew = UIMap.UIItemWindow2.UIAlertFormWindow; Size newSize = (Size)DevExpress.Utils.CodedUISupport.CodedUIUtils.ConvertFromString((String)uIAlertFormWindowNew.GetProperty("Size"), typeof(Size).FullName); Assert.IsTrue(newSize.Width < oldSize.Width && newSize.Height < oldSize.Height); } }
public void ChangeCellsValuesViaHandCoding() { using (new PivotGridTestInitializer()) { decimal firstCellNewValue = 2.87m; decimal secondCellNewValue = 3.62m; decimal thirdCellNewValue = 4.12m; PivotUIMap.SwitchToInPlaceEditorsDemoModule(); DXPivotGrid pivot = PivotUIMap.UIXtraPivotGridFeatureWindow2.UIPanelControl1Client.UIGcContainerClient.UIInplaceEditorsCustom.UIMainPanelClient.UIPivotGridControlPivotGrid; Mouse.Click(pivot.FocusedCell); DXTestControl activeEditor = pivot.ActiveEditor; activeEditor.Value = firstCellNewValue; pivot.FocusedCell = pivot.GetCell(0, 1); Keyboard.SendKeys("{Enter}"); activeEditor = pivot.ActiveEditor; activeEditor.Value = secondCellNewValue; activeEditor = pivot.GetCell(0, 2).ActiveEditor; activeEditor.Value = thirdCellNewValue; Mouse.Click(pivot.GetCell(0, 3)); Assert.AreEqual(firstCellNewValue, Decimal.Round((decimal)pivot.GetCellValue(0, 0), 5)); Assert.AreEqual(secondCellNewValue, Decimal.Round((decimal)pivot.GetCell(0, 1).Value, 5)); Assert.AreEqual(thirdCellNewValue, Decimal.Round((decimal)pivot.GetCellValue(0, 2), 5)); } }
public static void SwitchToDemoModule(DXTestControl accordionControl, string groupName, string moduleName) { DXTestControl accordionControlGroup = new DXTestControl(accordionControl); accordionControlGroup.SearchProperties[DXTestControl.PropertyNames.Name] = groupName; accordionControlGroup.SearchProperties[DXTestControl.PropertyNames.ClassName] = "AccordionControlGroup"; DXTestControl accordionControlItem = new DXTestControl(accordionControlGroup); accordionControlItem.SearchProperties[DXTestControl.PropertyNames.Name] = moduleName; accordionControlItem.SearchProperties[DXTestControl.PropertyNames.ClassName] = "AccordionControlItem"; if (!accordionControlItem.Exists) { foreach (string postfix in ModuleNamePostfixes) { accordionControlItem.SearchProperties[DXTestControl.PropertyNames.Name] = moduleName + postfix; if (accordionControlItem.Exists) { break; } } } Mouse.Click(accordionControlItem); }