Index: System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.csproj =================================================================== diff -u -r919e8fc12f0434beb590c5cbfa9160a6ff910c0b -r906334e37cb92ea27c8c721ba63e3fb39a333aac --- System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.csproj (.../AutomatedSystemTests.csproj) (revision 919e8fc12f0434beb590c5cbfa9160a6ff910c0b) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.csproj (.../AutomatedSystemTests.csproj) (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -150,15 +150,27 @@ true 325092cf-4a87-4a04-a578-da3aff997536 - + + ead7dbbc-6b97-49df-999c-7ea29e40cd4c + CalculatePathInPropertiesPanelOfBoundaryCategory.rxrec + true + baec6999-9bb8-4ef5-990c-cdf55ac97b71 + + + ead7dbbc-6b97-49df-999c-7ea29e40cd4c + CalculatePathInPropertiesPanelOfBoundaryCategory.rxrec + true + 4a953aa8-5f5c-4bf0-92db-7ab2d99cd6ac + + 772256b0-c236-4c14-95ed-d0682f4b713d - BorraEsto.rxrec + ValidateCategoryBoundaryInPropertiesPanel.rxrec true f617a859-903d-4326-a423-a5b02bf60a59 - + 772256b0-c236-4c14-95ed-d0682f4b713d - BorraEsto.rxrec + ValidateCategoryBoundaryInPropertiesPanel.rxrec true d7fac196-e1dd-4d34-ad29-fa17def25d19 @@ -777,15 +789,15 @@ true 5edd3525-f8f2-4e1e-9179-3c85f8165e4b - + 28e8d2ac-8496-492c-bd67-c05dd0310839 - ValidateCategoryBoundary.rxrec + ValidateCategoryBoundaryInDocumentView.rxrec true 311a55ef-b84d-4ae2-89cd-1f81897d4107 - + 28e8d2ac-8496-492c-bd67-c05dd0310839 - ValidateCategoryBoundary.rxrec + ValidateCategoryBoundaryInDocumentView.rxrec true 42cfd11f-b1b1-4fec-bfb1-b648b87e1bcf @@ -1158,8 +1170,13 @@ 137723a5-e147-4b62-8c15-5c31a3d68f96 40cb8eed-98dc-4b16-a5ad-7ef93b4f444c - + 8b6648ca-2429-462f-8074-96184700bbed + ead7dbbc-6b97-49df-999c-7ea29e40cd4c + 6fcd729a-b24a-42d7-8636-f8d75a283109 + + + 8b6648ca-2429-462f-8074-96184700bbed 772256b0-c236-4c14-95ed-d0682f4b713d 80ee3780-ce84-4fd2-bf57-10594c61bb9b @@ -1418,7 +1435,7 @@ 48b2d7f3-eb5f-4e6a-906d-06315aeaa9db 18e39f84-9b42-4666-802c-2fecd9846123 - + 8b6648ca-2429-462f-8074-96184700bbed 28e8d2ac-8496-492c-bd67-c05dd0310839 b8095d4b-9eb5-467b-976f-5811b54836f6 Index: System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.rxtst =================================================================== diff -u -r0d99cb5237cbc5c76ada9162169ba4f0e6df9813 -r906334e37cb92ea27c8c721ba63e3fb39a333aac --- System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.rxtst (.../AutomatedSystemTests.rxtst) (revision 0d99cb5237cbc5c76ada9162169ba4f0e6df9813) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.rxtst (.../AutomatedSystemTests.rxtst) (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -1,4 +1,4 @@ - + @@ -357,6 +357,16 @@ id="07d2eecf-fe16-4ca1-9bc5-a8e1504701c1" name="LoopRowsSetCustomAssessment"> + + + + + + - - @@ -7583,6 +7589,10 @@ + + @@ -7824,6 +7834,38 @@ name="LoopRowsSelectDetailedAssessmentType"> + + + + + + + + + + + + @@ -8479,9 +8521,23 @@ + + + + + + + name="ValidateBoundaries"> + name="ValidateBoundaries"> @@ -12944,22 +13000,30 @@ id="5cf5f154-cb30-4728-8b81-be2f1c2230a9" name="CalculateCategoryBoundary"> - - + + + + + + + + + + - - - - CustomAssessmentTypeItem - - FaalkansSetValue - - - FaalkansValidateValue - @@ -18765,9 +18823,159 @@ id="e680c0ff-a1be-4b90-bace-43e573cf1610"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fisheye: Tag 906334e37cb92ea27c8c721ba63e3fb39a333aac refers to a dead (removed) revision in file `System tests/AutomatedSystemTests/AutomatedSystemTests/BorraEsto.UserCode.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 906334e37cb92ea27c8c721ba63e3fb39a333aac refers to a dead (removed) revision in file `System tests/AutomatedSystemTests/AutomatedSystemTests/BorraEsto.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 906334e37cb92ea27c8c721ba63e3fb39a333aac refers to a dead (removed) revision in file `System tests/AutomatedSystemTests/AutomatedSystemTests/BorraEsto.rxrec'. Fisheye: No comparison available. Pass `N' to diff? Index: System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.UserCode.cs =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.UserCode.cs (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.UserCode.cs (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// This file was automatically generated by RANOREX. +// Your custom recording code should go in this file. +// The designer will only add methods to this file, so your custom code won't be overwritten. +// http://www.ranorex.com +// +/////////////////////////////////////////////////////////////////////////////// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; +using System.Drawing; +using System.Threading; +using WinForms = System.Windows.Forms; + +using Ranorex; +using Ranorex.Core; +using Ranorex.Core.Repository; +using Ranorex.Core.Testing; + +namespace AutomatedSystemTests +{ + public partial class CalculatePathInPropertiesPanelOfBoundaryCategory + { + /// + /// This method gets called right after the recording has been started. + /// It can be used to execute recording specific initialization code. + /// + private void Init() + { + // Your recording specific initialization code goes here. + } + + public void BuildPathInPPToCategoryBoundary() + { + string pathLevelOne = scopeSuffix=="t"?"Categoriegrenzen voor dit traject":"Categoriegrenzen per vak"; + string pathLevelTwo; + switch (categoryType) { + case "I": + pathLevelTwo = "[1]"; + break; + case "II": + pathLevelTwo = "[2]"; + break; + case "III": + pathLevelTwo = "[3]"; + break; + case "IV": + pathLevelTwo = "[4]"; + break; + case "V": + pathLevelTwo = "[5]"; + break; + case "VI": + pathLevelTwo = "[6]"; + break; + default: + Report.Log(ReportLevel.Error, "", categoryType + " is no valid category type!"); + throw new Exception(); + break; + } + string pathLevelThree = boundaryType + "grens [1/jaar]"; + path = pathLevelOne + ">" + pathLevelTwo + ">" + pathLevelThree; + } + + } +} Index: System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.cs =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.cs (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.cs (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,143 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// This file was automatically generated by RANOREX. +// DO NOT MODIFY THIS FILE! It is regenerated by the designer. +// All your modifications will be lost! +// http://www.ranorex.com +// +/////////////////////////////////////////////////////////////////////////////// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; +using System.Drawing; +using System.Threading; +using WinForms = System.Windows.Forms; + +using Ranorex; +using Ranorex.Core; +using Ranorex.Core.Testing; +using Ranorex.Core.Repository; + +namespace AutomatedSystemTests +{ +#pragma warning disable 0436 //(CS0436) The type 'type' in 'assembly' conflicts with the imported type 'type2' in 'assembly'. Using the type defined in 'assembly'. + /// + ///The CalculatePathInPropertiesPanelOfBoundaryCategory recording. + /// + [TestModule("6fcd729a-b24a-42d7-8636-f8d75a283109", ModuleType.Recording, 1)] + public partial class CalculatePathInPropertiesPanelOfBoundaryCategory : ITestModule + { + /// + /// Holds an instance of the AutomatedSystemTestsRepository repository. + /// + public static AutomatedSystemTestsRepository repo = AutomatedSystemTestsRepository.Instance; + + static CalculatePathInPropertiesPanelOfBoundaryCategory instance = new CalculatePathInPropertiesPanelOfBoundaryCategory(); + + /// + /// Constructs a new instance. + /// + public CalculatePathInPropertiesPanelOfBoundaryCategory() + { + path = ""; + categoryType = ""; + scopeSuffix = ""; + boundaryType = ""; + } + + /// + /// Gets a static instance of this recording. + /// + public static CalculatePathInPropertiesPanelOfBoundaryCategory Instance + { + get { return instance; } + } + +#region Variables + + string _path; + + /// + /// Gets or sets the value of variable path. + /// + [TestVariable("58843f31-3094-441c-a3e5-9fe451ee7b75")] + public string path + { + get { return _path; } + set { _path = value; } + } + + string _categoryType; + + /// + /// Gets or sets the value of variable categoryType. + /// + [TestVariable("58116721-7a4c-4863-a1be-ee8671658a1f")] + public string categoryType + { + get { return _categoryType; } + set { _categoryType = value; } + } + + string _scopeSuffix; + + /// + /// Gets or sets the value of variable scopeSuffix. + /// + [TestVariable("89a99481-fa7b-4744-8c1f-17c4fe82e0fc")] + public string scopeSuffix + { + get { return _scopeSuffix; } + set { _scopeSuffix = value; } + } + + string _boundaryType; + + /// + /// Gets or sets the value of variable boundaryType. + /// + [TestVariable("23fa09c0-3863-421b-a382-eac9a0d3f1c7")] + public string boundaryType + { + get { return _boundaryType; } + set { _boundaryType = value; } + } + +#endregion + + /// + /// Starts the replay of the static recording . + /// + [System.CodeDom.Compiler.GeneratedCode("Ranorex", global::Ranorex.Core.Constants.CodeGenVersion)] + public static void Start() + { + TestModuleRunner.Run(Instance); + } + + /// + /// Performs the playback of actions in this recording. + /// + /// You should not call this method directly, instead pass the module + /// instance to the method + /// that will in turn invoke this method. + [System.CodeDom.Compiler.GeneratedCode("Ranorex", global::Ranorex.Core.Constants.CodeGenVersion)] + void ITestModule.Run() + { + Mouse.DefaultMoveTime = 300; + Keyboard.DefaultKeyPressTime = 20; + Delay.SpeedFactor = 1.00; + + Init(); + + BuildPathInPPToCategoryBoundary(); + Delay.Milliseconds(0); + + } + +#region Image Feature Data +#endregion + } +#pragma warning restore 0436 +} Index: System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.rxrec =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.rxrec (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/CalculatePathInPropertiesPanelOfBoundaryCategory.rxrec (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,79 @@ + + + + 1 + + + False + + + True + + + 1 + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CalculatePathInPropertiesPanelOfBoundaryCategory.UserCode.cs + + + + Fisheye: Tag 906334e37cb92ea27c8c721ba63e3fb39a333aac refers to a dead (removed) revision in file `System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundary.UserCode.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 906334e37cb92ea27c8c721ba63e3fb39a333aac refers to a dead (removed) revision in file `System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundary.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 906334e37cb92ea27c8c721ba63e3fb39a333aac refers to a dead (removed) revision in file `System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundary.rxrec'. Fisheye: No comparison available. Pass `N' to diff? Index: System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.UserCode.cs =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.UserCode.cs (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.UserCode.cs (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,56 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// This file was automatically generated by RANOREX. +// Your custom recording code should go in this file. +// The designer will only add methods to this file, so your custom code won't be overwritten. +// http://www.ranorex.com +// +/////////////////////////////////////////////////////////////////////////////// + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Text.RegularExpressions; +using System.Drawing; +using System.Threading; +using WinForms = System.Windows.Forms; + +using Ranorex; +using Ranorex.Core; +using Ranorex.Core.Repository; +using Ranorex.Core.Testing; + +namespace AutomatedSystemTests +{ + public partial class ValidateCategoryBoundaryInDocumentView + { + /// + /// This method gets called right after the recording has been started. + /// It can be used to execute recording specific initialization code. + /// + private void Init() + { + // Your recording specific initialization code goes here. + } + + public void Validate_GenericCategoryBoundaryCellAlmostEqual(RepoItemInfo cellInfo) + { + Report.Log(ReportLevel.Info, "Validation", "(Optional Action)\r\nValidating AttributeEqual (AccessibleValue=$expectedBoundary) on item 'cellInfo'.", cellInfo); + var currentValue = cellInfo.CreateAdapter(true).GetAttributeValue("AccessibleValue"); + if (currentValue==expectedBoundary) { + Validate.AttributeEqual(cellInfo, "AccessibleValue", expectedBoundary); + } + else { + System.Globalization.CultureInfo currentCulture = CultureInfo.CurrentCulture; + Report.Log(ReportLevel.Info, "Validation", "Value found: " + currentValue + " is not equal to expected value: " + expectedBoundary + "\r\nEvaluating whether they are almost (within 0.01%) equal..."); + var expectedDouble = 1.0/(Double.Parse(expectedBoundary.Substring(2,expectedBoundary.Length-2), currentCulture)); + var currentDouble = 1.0/(Double.Parse(currentValue.Substring(2,currentValue.Length-2), currentCulture)); + var deviation = Math.Abs(100.0*(expectedDouble - currentDouble) / expectedDouble); + Report.Log(ReportLevel.Info, "Validation", "Deviation = " + deviation + " %"); + Validate.IsTrue(deviation<0.01); + } + } + + } +} Index: System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.cs =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.cs (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.cs (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,154 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// This file was automatically generated by RANOREX. +// DO NOT MODIFY THIS FILE! It is regenerated by the designer. +// All your modifications will be lost! +// http://www.ranorex.com +// +/////////////////////////////////////////////////////////////////////////////// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; +using System.Drawing; +using System.Threading; +using WinForms = System.Windows.Forms; + +using Ranorex; +using Ranorex.Core; +using Ranorex.Core.Testing; +using Ranorex.Core.Repository; + +namespace AutomatedSystemTests +{ +#pragma warning disable 0436 //(CS0436) The type 'type' in 'assembly' conflicts with the imported type 'type2' in 'assembly'. Using the type defined in 'assembly'. + /// + ///The ValidateCategoryBoundaryInDocumentView recording. + /// + [TestModule("b8095d4b-9eb5-467b-976f-5811b54836f6", ModuleType.Recording, 1)] + public partial class ValidateCategoryBoundaryInDocumentView : ITestModule + { + /// + /// Holds an instance of the AutomatedSystemTestsRepository repository. + /// + public static AutomatedSystemTestsRepository repo = AutomatedSystemTestsRepository.Instance; + + static ValidateCategoryBoundaryInDocumentView instance = new ValidateCategoryBoundaryInDocumentView(); + + /// + /// Constructs a new instance. + /// + public ValidateCategoryBoundaryInDocumentView() + { + expectedBoundary = ""; + } + + /// + /// Gets a static instance of this recording. + /// + public static ValidateCategoryBoundaryInDocumentView Instance + { + get { return instance; } + } + +#region Variables + + string _expectedBoundary; + + /// + /// Gets or sets the value of variable expectedBoundary. + /// + [TestVariable("74f78223-bbfe-48f3-8b40-2445e6a47468")] + public string expectedBoundary + { + get { return _expectedBoundary; } + set { _expectedBoundary = value; } + } + + /// + /// Gets or sets the value of variable sectionSubstring. + /// + [TestVariable("7f611ae2-9cdd-49ab-9f5c-3a3d10895d80")] + public string sectionSubstring + { + get { return repo.sectionSubstring; } + set { repo.sectionSubstring = value; } + } + + /// + /// Gets or sets the value of variable categoryName. + /// + [TestVariable("e76c5155-f1f8-4415-bd13-dde7073c53b6")] + public string categoryName + { + get { return repo.categoryName; } + set { repo.categoryName = value; } + } + + /// + /// Gets or sets the value of variable categorysuffix. + /// + [TestVariable("b8671a42-1c75-4941-b387-69d720e545f8")] + public string categorysuffix + { + get { return repo.categorysuffix; } + set { repo.categorysuffix = value; } + } + + /// + /// Gets or sets the value of variable boundaryTypeSubstring. + /// + [TestVariable("8f75181e-5620-4184-b263-790e9b45c319")] + public string boundaryTypeSubstring + { + get { return repo.boundaryTypeSubstring; } + set { repo.boundaryTypeSubstring = value; } + } + +#endregion + + /// + /// Starts the replay of the static recording . + /// + [System.CodeDom.Compiler.GeneratedCode("Ranorex", global::Ranorex.Core.Constants.CodeGenVersion)] + public static void Start() + { + TestModuleRunner.Run(Instance); + } + + /// + /// Performs the playback of actions in this recording. + /// + /// You should not call this method directly, instead pass the module + /// instance to the method + /// that will in turn invoke this method. + [System.CodeDom.Compiler.GeneratedCode("Ranorex", global::Ranorex.Core.Constants.CodeGenVersion)] + void ITestModule.Run() + { + Mouse.DefaultMoveTime = 300; + Keyboard.DefaultKeyPressTime = 20; + Delay.SpeedFactor = 1.00; + + Init(); + + //Report.Log(ReportLevel.Info, "Invoke action", "Invoking Focus() on item 'RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCell'.", repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCellInfo, new RecordItemIndex(0)); + //repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCell.Focus(); + //Delay.Milliseconds(0); + + //Report.Log(ReportLevel.Info, "Invoke action", "Invoking Select() on item 'RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCell'.", repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCellInfo, new RecordItemIndex(1)); + //repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCell.Select(); + //Delay.Milliseconds(0); + + Report.Screenshot(ReportLevel.Info, "User", "", repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCell, false, new RecordItemIndex(2)); + + Validate_GenericCategoryBoundaryCellAlmostEqual(repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCellInfo); + Delay.Milliseconds(0); + + } + +#region Image Feature Data +#endregion + } +#pragma warning restore 0436 +} Index: System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.rxrec =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.rxrec (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInDocumentView.rxrec (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,143 @@ + + + + 1 + + + False + + + True + + + 1 + + + True + + + + + + + + + + + + + + + + /form[@automationid='RiskeerMainWindow']/?/container[10]/container[@controltypename='WinFormsAdapter']/container[@controlname='FailureMechanismAssemblyCategoriesView']/?/container[@controlname='failureMechanism'+$sectionSubstring+'AssemblyGroupBox']/?/table/row[@accessiblevalue>$categoryName]/cell[@accessiblename>$boundaryTypeSubstring] + + + + + + + + + + + + + /form[@automationid='RiskeerMainWindow']/?/container[10]/container[@controltypename='WinFormsAdapter']/container[@controlname='FailureMechanismAssemblyCategoriesView']/?/container[@controlname='failureMechanism'+$sectionSubstring+'AssemblyGroupBox']/?/table/row[@accessiblevalue>$categoryName]/cell[@accessiblename>$boundaryTypeSubstring] + + + + + + + + + + + + + /form[@automationid='RiskeerMainWindow']/?/container[10]/container[@controltypename='WinFormsAdapter']/container[@controlname='FailureMechanismAssemblyCategoriesView']/?/container[@controlname='failureMechanism'+$sectionSubstring+'AssemblyGroupBox']/?/table/row[@accessiblevalue>$categoryName+$categorysuffix]/cell[@accessiblename>$boundaryTypeSubstring] + + + + + + + + + + + + Ranorex.Core.Repository.RepoItemInfo, Ranorex.Core, Culture=neutral + + + + + + /form[@automationid='RiskeerMainWindow']/?/container[10]/container[@controltypename='WinFormsAdapter']/container[@controlname='FailureMechanismAssemblyCategoriesView']/?/container[@controlname='failureMechanism'+$sectionSubstring+'AssemblyGroupBox']/?/table/row[@accessiblevalue>$categoryName+$categorysuffix]/cell[@accessiblename>$boundaryTypeSubstring] + + + + + + + + + + + + + + ValidateCategoryBoundaryInDocumentView.UserCode.cs + + + + Index: System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.UserCode.cs =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.UserCode.cs (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.UserCode.cs (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,85 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// This file was automatically generated by RANOREX. +// Your custom recording code should go in this file. +// The designer will only add methods to this file, so your custom code won't be overwritten. +// http://www.ranorex.com +// +/////////////////////////////////////////////////////////////////////////////// + +using System; +using System.Globalization; +using System.Linq; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; +using System.Drawing; +using System.Threading; +using WinForms = System.Windows.Forms; + +using Ranorex; +using Ranorex.Core; +using Ranorex.Core.Repository; +using Ranorex.Core.Testing; + +namespace AutomatedSystemTests +{ + public partial class ValidateCategoryBoundaryInPropertiesPanel + { + /// + /// This method gets called right after the recording has been started. + /// It can be used to execute recording specific initialization code. + /// + private void Init() + { + // Your recording specific initialization code goes here. + } + + public Ranorex.Row GetRowInPropertiesPanelGivenPath(Adapter argumentAdapter, string pathItem) + { + int minimumIndex = 0; + var stepsPathItem = pathItem.Split('>').ToList(); + Ranorex.Row stepRow = argumentAdapter.As().Rows.ToList()[1]; + for (int i=0; i < stepsPathItem.Count; i++) { + // Find the item corresponding to the step + var step = stepsPathItem[i]; + var completeList = argumentAdapter.As
().Rows.ToList(); + var searchList = completeList.GetRange(minimumIndex, completeList.Count-minimumIndex); + var indexStepRow = searchList.FindIndex(rw => rw.GetAttributeValue("AccessibleName") == step); + stepRow = searchList[indexStepRow]; + // Select (and expand) the item + stepRow.Focus(); + stepRow.Select(); + if (i != stepsPathItem.Count - 1) + { + stepRow.PressKeys("{Right}"); + } + + // Update the minimum index administration (only search forward) + minimumIndex += 1 + indexStepRow; + } + return stepRow; + } + + public void ValidateValueCellGivenPath(Adapter propertiesPanelAdapter, string pathCell) + { + Ranorex.Row row = GetRowInPropertiesPanelGivenPath(propertiesPanelAdapter, pathCell); + var currentBoundary = row.GetAttributeValue("AccessibleValue"); + Report.Log(ReportLevel.Info, "", "Current value: " + currentBoundary); + Report.Log(ReportLevel.Info, "", "Expected value: " + expectedBoundary); + if (currentBoundary==expectedBoundary) { + Validate.AreEqual(currentBoundary, expectedBoundary); + } + else { + System.Globalization.CultureInfo currentCulture = CultureInfo.CurrentCulture; + Report.Log(ReportLevel.Info, "Validation", "Value found: " + currentBoundary + " is not equal to expected value: " + expectedBoundary + "\r\nEvaluating whether they are almost (within 0.01%) equal..."); + var expectedDouble = 1.0/(Double.Parse(expectedBoundary.Substring(2,expectedBoundary.Length-2), currentCulture)); + var currentDouble = 1.0/(Double.Parse(currentBoundary.Substring(2,currentBoundary.Length-2), currentCulture)); + var deviation = Math.Abs(100.0*(expectedDouble - currentDouble) / expectedDouble); + Report.Log(ReportLevel.Info, "Validation", "Deviation = " + deviation + " %"); + Validate.IsTrue(deviation<0.01); + } + } + + } +} Index: System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.cs =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.cs (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.cs (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,116 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// This file was automatically generated by RANOREX. +// DO NOT MODIFY THIS FILE! It is regenerated by the designer. +// All your modifications will be lost! +// http://www.ranorex.com +// +/////////////////////////////////////////////////////////////////////////////// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; +using System.Drawing; +using System.Threading; +using WinForms = System.Windows.Forms; + +using Ranorex; +using Ranorex.Core; +using Ranorex.Core.Testing; +using Ranorex.Core.Repository; + +namespace AutomatedSystemTests +{ +#pragma warning disable 0436 //(CS0436) The type 'type' in 'assembly' conflicts with the imported type 'type2' in 'assembly'. Using the type defined in 'assembly'. + /// + ///The ValidateCategoryBoundaryInPropertiesPanel recording. + /// + [TestModule("80ee3780-ce84-4fd2-bf57-10594c61bb9b", ModuleType.Recording, 1)] + public partial class ValidateCategoryBoundaryInPropertiesPanel : ITestModule + { + /// + /// Holds an instance of the AutomatedSystemTestsRepository repository. + /// + public static AutomatedSystemTestsRepository repo = AutomatedSystemTestsRepository.Instance; + + static ValidateCategoryBoundaryInPropertiesPanel instance = new ValidateCategoryBoundaryInPropertiesPanel(); + + /// + /// Constructs a new instance. + /// + public ValidateCategoryBoundaryInPropertiesPanel() + { + expectedBoundary = ""; + pathCellToValidate = ""; + } + + /// + /// Gets a static instance of this recording. + /// + public static ValidateCategoryBoundaryInPropertiesPanel Instance + { + get { return instance; } + } + +#region Variables + + string _expectedBoundary; + + /// + /// Gets or sets the value of variable expectedBoundary. + /// + [TestVariable("50e84123-8388-42eb-96bc-d22731373c20")] + public string expectedBoundary + { + get { return _expectedBoundary; } + set { _expectedBoundary = value; } + } + + string _pathCellToValidate; + + /// + /// Gets or sets the value of variable pathCellToValidate. + /// + [TestVariable("7e05293e-8342-4b70-9b76-96a72de0f75c")] + public string pathCellToValidate + { + get { return _pathCellToValidate; } + set { _pathCellToValidate = value; } + } + +#endregion + + /// + /// Starts the replay of the static recording . + /// + [System.CodeDom.Compiler.GeneratedCode("Ranorex", global::Ranorex.Core.Constants.CodeGenVersion)] + public static void Start() + { + TestModuleRunner.Run(Instance); + } + + /// + /// Performs the playback of actions in this recording. + /// + /// You should not call this method directly, instead pass the module + /// instance to the method + /// that will in turn invoke this method. + [System.CodeDom.Compiler.GeneratedCode("Ranorex", global::Ranorex.Core.Constants.CodeGenVersion)] + void ITestModule.Run() + { + Mouse.DefaultMoveTime = 0; + Keyboard.DefaultKeyPressTime = 20; + Delay.SpeedFactor = 0.00; + + Init(); + + ValidateValueCellGivenPath(repo.RiskeerMainWindow.PropertiesPanelContainer.Table.Self, pathCellToValidate); + + } + +#region Image Feature Data +#endregion + } +#pragma warning restore 0436 +} Index: System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.rxrec =================================================================== diff -u --- System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.rxrec (revision 0) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundaryInPropertiesPanel.rxrec (revision 906334e37cb92ea27c8c721ba63e3fb39a333aac) @@ -0,0 +1,97 @@ + + + + 1 + + + True + + + True + + + 1 + + + True + + + + + + + + + + + + + + + + + + + Ranorex.Adapter, Ranorex.Core, Culture=neutral + + + + + + /form[@automationid='RiskeerMainWindow']//container[@controlname='PropertiesPanelGridView']//table[@accessiblename='Properties Window'] + + + + + + System.String + + + + + + + + + + + + + + + ValidateCategoryBoundaryInPropertiesPanel.UserCode.cs + + + +