Index: System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.rxtst =================================================================== diff -u -rb0c6dad6d614994cd4dd7f880ca275315e99c8ef -r36d78515c3dafe4660c1252ddd8063107c286aa4 --- System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.rxtst (.../AutomatedSystemTests.rxtst) (revision b0c6dad6d614994cd4dd7f880ca275315e99c8ef) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/AutomatedSystemTests.rxtst (.../AutomatedSystemTests.rxtst) (revision 36d78515c3dafe4660c1252ddd8063107c286aa4) @@ -969,7 +969,6 @@ - - + + + + + + - - - - - - + name="LoopCategories(I_VI)"> @@ -7162,8 +7163,9 @@ + name="LoopBoundaryType(LowerUpper)"> - - - - + + + + + + + + - - + id="73bba093-ff0b-403e-a5d4-33568e569c7c" + name="LoopScope(t_v)"> - - - - + id="a19d64b1-9804-430e-b24d-b02b6bf6945a" + name="LoopCategories(I_VI)"> + + + + + + - - @@ -17231,6 +17241,47 @@ + + + + suffixScope + + + substringScope + + + + + + + + + + + + + + + + + +
+ suffixScope + + substringScope +
+ t + +
+ v + + Section +
+
@@ -17273,9 +17324,6 @@ id="36de5b8d-308c-4502-9938-6fab6ac232a3"> - - + id="73bba093-ff0b-403e-a5d4-33568e569c7c"> @@ -17321,9 +17369,6 @@ id="78a783b3-ec47-4145-85f3-55c2b56b7aa0"> - - - - - - - - (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/ValidateCategoryBoundary.cs =================================================================== diff -u -rb0c6dad6d614994cd4dd7f880ca275315e99c8ef -r36d78515c3dafe4660c1252ddd8063107c286aa4 --- System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundary.cs (.../ValidateCategoryBoundary.cs) (revision b0c6dad6d614994cd4dd7f880ca275315e99c8ef) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundary.cs (.../ValidateCategoryBoundary.cs) (revision 36d78515c3dafe4660c1252ddd8063107c286aa4) @@ -142,8 +142,7 @@ Report.Screenshot(ReportLevel.Info, "User", "", repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCell, false, new RecordItemIndex(2)); - Report.Log(ReportLevel.Info, "Validation", "Validating AttributeEqual (AccessibleValue=$expectedBoundary) on item 'RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCell'.", repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCellInfo, new RecordItemIndex(3)); - Validate.AttributeEqual(repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCellInfo, "AccessibleValue", expectedBoundary); + Validate_GenericCategoryBoundaryCellAlmostEqual(repo.RiskeerMainWindow.DocumentViewContainerUncached.ViewCategoryBoundaries.GenericCategoryBoundaries.GenericCategoryBoundaryCellInfo); Delay.Milliseconds(0); } Index: System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundary.rxrec =================================================================== diff -u -rb0c6dad6d614994cd4dd7f880ca275315e99c8ef -r36d78515c3dafe4660c1252ddd8063107c286aa4 --- System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundary.rxrec (.../ValidateCategoryBoundary.rxrec) (revision b0c6dad6d614994cd4dd7f880ca275315e99c8ef) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/ValidateCategoryBoundary.rxrec (.../ValidateCategoryBoundary.rxrec) (revision 36d78515c3dafe4660c1252ddd8063107c286aa4) @@ -89,33 +89,37 @@ - + isexternaltestmethod="False" + methodname="Validate_GenericCategoryBoundaryCellAlmostEqual" + namespace="AutomatedSystemTests" + optional="False"> - - - - - /form[@automationid='RiskeerMainWindow']/?/container[10]/container[@controltypename='WinFormsAdapter']/container[@controlname='FailureMechanismAssemblyCategoriesView']/?/container[@controlname='failureMechanism'+$sectionSubstring+'AssemblyGroupBox']/?/table/row[@accessiblevalue>$categoryName+$categorysuffix]/cell[@accessiblename>$boundaryTypeSubstring] - - - - AccessibleValue - - - yourValue - - + + + + 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] + + + + + - + isexternaltestmethod="False" + methodname="Validate_GenericCellIcon" + namespace="AutomatedSystemTests" + optional="False"> - - - /form[@automationid='RiskeerMainWindow']//container[@controlname='MessageWindow']/table[@controlname='messagesDataGridView']/row[@accessiblename='Row '+$indexRowMessage]/cell[@accessiblename=' Row 0'] - - - - - - - - Comparing with error icon - - + + + + + /form[@automationid='RiskeerMainWindow']//container[@controlname='MessageWindow']/table[@controlname='messagesDataGridView']/row[@accessiblename='Row '+$indexRowMessage]/cell[@accessiblename=' Row 0'] + + + + + + + + Ranorex.Core.Repository.RepoItemInfo, Ranorex.Core, Culture=neutral + + + + + + /form[@automationid='RiskeerMainWindow']//container[@controlname='MessageWindow']/table[@controlname='messagesDataGridView']/row[@accessiblename='Row '+$indexRowMessage]/cell[@accessiblename>' Row'] + + + + +