/// <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() { var repo = AutomatedSystemTests.AutomatedSystemTestsRepository.Instance; var table = repo.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.SelfInfo.CreateAdapter <Table>(true); Ranorex.Row row = PropertiesPanelHelpers.GetRowInPropertiesPanelGivenPath(pathToRowInPP, table); string currentValue = row.Element.GetAttributeValueText("AccessibleValue"); Validate.AreEqual(currentValue, expectedText); }
public void ValidateValueDoubleOfParameterInPropertiesPanelGivenPath(Adapter propertiesPanelAdapter, string pathToRowInPropertiesPanel) { System.Globalization.CultureInfo fixedDataSourceCulture = new CultureInfo("en-US"); fixedDataSourceCulture.NumberFormat.NumberDecimalSeparator = "."; fixedDataSourceCulture.NumberFormat.NumberGroupSeparator = ""; System.Globalization.CultureInfo currentCulture = CultureInfo.CurrentCulture; Ranorex.Row row = PropertiesPanelHelpers.GetRowInPropertiesPanelGivenPath(pathToRowInPropertiesPanel, propertiesPanelAdapter); string currentValueString = row.Element.GetAttributeValueText("AccessibleValue"); double currentValueDouble = Double.Parse(currentValueString, currentCulture); double expectedValueDouble = Double.Parse(expectedValueString, fixedDataSourceCulture); double deviation = Math.Abs(currentValueDouble - expectedValueDouble); Validate.IsTrue(deviation < 0.00000001); }