/// <summary> /// Performs the playback of actions in this module. /// </summary> /// <remarks>You should not call this method directly, instead pass the module /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method /// that will in turn invoke this method.</remarks> void ITestModule.Run() { Mouse.DefaultMoveTime = 0; Keyboard.DefaultKeyPressTime = 0; Delay.SpeedFactor = 0.0; Keyboard.Press("{Apps}"); AutomatedSystemTestsRepository myRepository = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; var contextMenu = myRepository.ContextMenu.Self; var itemsInContextMenu = contextMenu.Children; var numberOfItemsWithNameInContextMenu = itemsInContextMenu.Where(it => it.Element.ToString().Contains(nameOfItem)).ToList().Count; if (numberOfItemsWithNameInContextMenu > 0) { Report.Log(ReportLevel.Success, nameOfItem + " found in context menu."); Report.Screenshot(ReportLevel.Info, "User", "", contextMenu, false); } else { Report.Log(ReportLevel.Warn, nameOfItem + " not found in context menu."); Report.Screenshot(ReportLevel.Warn, "User", "", contextMenu, false); } Keyboard.Press("{Escape}"); }
/// <summary> /// Performs the playback of actions in this module. /// </summary> /// <remarks>You should not call this method directly, instead pass the module /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method /// that will in turn invoke this method.</remarks> void ITestModule.Run() { AutomatedSystemTestsRepository myRepository = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; Adapter propertiesPanelAdapter = myRepository.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.Self; Ranorex.Row row = PropertiesPanelHelpers.GetRowInPropertiesPanelGivenPath(pathToElementInPropertiesPanel, propertiesPanelAdapter); valueOfElement = row.Element.GetAttributeValueText("AccessibleValue"); }
/// <summary> /// Performs the playback of actions in this module. /// </summary> /// <remarks>You should not call this method directly, instead pass the module /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method /// that will in turn invoke this method.</remarks> void ITestModule.Run() { AutomatedSystemTestsRepository myRepository = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; Adapter propertiesPanelAdapter = myRepository.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.Self; Ranorex.Row row = PropertiesPanelHelpers.GetRowInPropertiesPanelGivenPath(pathToElementInPropertiesPanel, propertiesPanelAdapter); row.SetValue(newValueForParameter, typeParameter); }
/// <summary> /// Performs the playback of actions in this module. /// </summary> /// <remarks>You should not call this method directly, instead pass the module /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method /// that will in turn invoke this method.</remarks> void ITestModule.Run() { string path = pathToNodeInProjectExplorer.ReplacePathAliases(); AutomatedSystemTestsRepository myRepository = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; RepoItemInfo rootNodeProject = myRepository.RiskeerMainWindow.ProjectExplorerPanel.TrajectNode.SelfInfo; TreeItem nodeTreeItem = TreeItemHelpers.FindNodeInTree(path, rootNodeProject, (ti) => {}); structureNode = GetStructureTreeItem(nodeTreeItem); }
public void SelectItemFromDynamicDropDownMenuInRowPropertiesPanel(RepoItemInfo listitemInfo, string pathToRowItemInPropertiesPanel) { AutomatedSystemTestsRepository myRepository = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; Adapter propertiesPanelAdapter = myRepository.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.Self; Ranorex.Row row = GetRowInPropertiesPanelGivenPath(propertiesPanelAdapter, pathToRowItemInPropertiesPanel); row.Click(); row.Click(".98;.5"); listitemInfo.FindAdapter <ListItem>().Focus(); listitemInfo.FindAdapter <ListItem>().Click(); }
/// <summary> /// Performs the playback of actions in this module. /// </summary> /// <remarks>You should not call this method directly, instead pass the module /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method /// that will in turn invoke this method.</remarks> void ITestModule.Run() { string path = pathToFolder.ReplacePathAliases(); AutomatedSystemTestsRepository myRepository = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; var rootNodeInfo = myRepository.RiskeerMainWindow.ProjectExplorerPanel.TrajectNode.SelfInfo; Action <TreeItem> actions = (it => (it as Adapter).Focus()); actions += (it => ValidateNodeContainsChildWithName(it, nameOfNode, nodeIsExpectedToBeContained == "true")); TreeItemHelpers.FindNodeInTree(path, rootNodeInfo, actions); return; }
public void ProceedAccordingToReachabilityServer() { AutomatedSystemTestsRepository repo = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; try { repo.Fout.ButtonOKInfo.WaitForExists(1000); // If fout dialog is shown, connection cannot be established with the server Report.Log(ReportLevel.Warn, "Cannot retrieve data from WMTS server."); repo.Fout.ButtonOK.Click(); repo.BackgroundMapDataSelectionDialog.DialogSelectionBackground.CancelButton.Click(); } catch (Exception) { // Connection established with server and WMTS data retrieved Report.Log(ReportLevel.Info, "Data received from WMTS server."); repo.BackgroundMapDataSelectionDialog.Row0.Click(); repo.BackgroundMapDataSelectionDialog.DialogSelectionBackground.SelectButton.Click(); } }
/// <summary> /// Performs the playback of actions in this module. /// </summary> /// <remarks>You should not call this method directly, instead pass the module /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method /// that will in turn invoke this method.</remarks> void ITestModule.Run() { Mouse.DefaultMoveTime = 0; Keyboard.DefaultKeyPressTime = 0; Delay.SpeedFactor = 0.0; AutomatedSystemTestsRepository myRepository = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; Adapter propertiesPanelAdapter = myRepository.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.Self; IEnumerable <Row> rowsList = propertiesPanelAdapter.As <Table>().Rows; IEnumerable <Row> rowsMustBeCollapsed = rowsList.Where(rw => rw.Element.GetAttributeValueText("AccessibleState").ToString().Contains("Expanded")); foreach (var rw in rowsMustBeCollapsed.Reverse()) { rw.Focus(); rw.Select(); rw.PressKeys("{Left}"); } }
private string GetCategoriesBoundariesFromPropertiesPanel() { AutomatedSystemTestsRepository repo = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; Adapter propertiesPanelAdapter = repo.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.Self; var allRows = propertiesPanelAdapter.As <Table>().Rows.ToList(); string allResults = ""; foreach (Ranorex.Row row in allRows) { string parameterName = row.Element.GetAttributeValueText("AccessibleName"); if (parameterName.Contains("grens [1/jaar]")) { allResults += row.Element.GetAttributeValueText("AccessibleValue") + ";"; } } allResults = allResults.TrimEnd(';'); return(allResults); }
/// <summary> /// Performs the playback of actions in this module. /// </summary> /// <remarks>You should not call this method directly, instead pass the module /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method /// that will in turn invoke this method.</remarks> void ITestModule.Run() { Mouse.DefaultMoveTime = 0; Keyboard.DefaultKeyPressTime = 0; Delay.SpeedFactor = 0; AutomatedSystemTestsRepository myRepository = global::AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; Adapter propertiesPanelAdapter = myRepository.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.Self; var allRows = propertiesPanelAdapter.As <Table>().Rows.ToList(); var myExport = new CsvExport(separationCharacter, false, true); int index = 0; foreach (Ranorex.Row row in allRows) { myExport.AddRow(); myExport["indexRow"] = index.ToString(); myExport["AccessibleName"] = row.Element.GetAttributeValueText("AccessibleName"); myExport["AccessibleValue"] = row.Element.GetAttributeValueText("AccessibleValue").ToNoGroupSeparator().ToInvariantCultureDecimalSeparator(); index++; } myExport.ExportToFile(fileName); }