Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsPropertiesPanel/ExpandAllRowItemsInPropertiesPanel.cs
===================================================================
diff -u -r35e1f5d8cc279c74a0d63d6cfb8916fe5d132ef4 -r0b0398cbb532e1ab5190b7ca623830700ab846cd
--- System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsPropertiesPanel/ExpandAllRowItemsInPropertiesPanel.cs (.../ExpandAllRowItemsInPropertiesPanel.cs) (revision 35e1f5d8cc279c74a0d63d6cfb8916fe5d132ef4)
+++ System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsPropertiesPanel/ExpandAllRowItemsInPropertiesPanel.cs (.../ExpandAllRowItemsInPropertiesPanel.cs) (revision 0b0398cbb532e1ab5190b7ca623830700ab846cd)
@@ -60,13 +60,29 @@
Adapter propertiesPanelAdapter = myRepository.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.Self;
var rowsList = propertiesPanelAdapter.As
().Rows.ToList();
- if (rowsList.Count>0) {
- Ranorex.Row currentRow = rowsList[0];
- currentRow.Focus();
- currentRow.Select();
- currentRow.PressKeys("{Right " + durationPressRightKey + "}");
+ var rowsMustBeExpanded = rowsList.FindAll(rw=>rw.Element.GetAttributeValueText("AccessibleState").ToString().Contains("Collapsed"));
+ bool expNeeded = rowsMustBeExpanded.Count>0;
+ while (expNeeded) {
+ foreach (var rw in rowsMustBeExpanded) {
+ rw.Focus();
+ rw.Select();
+ rw.PressKeys("{Right}");
+ }
+ rowsList = myRepository.RiskeerMainWindow.ContainerMultipleViews.PropertiesPanelContainer.Table.Self.As().Rows.Except(rowsList).ToList();
+ rowsMustBeExpanded = rowsList.FindAll(rw=>rw.Element.GetAttributeValueText("AccessibleState").ToString().Contains("Collapsed"));
+ expNeeded = rowsMustBeExpanded.Count>0;
}
+ //foreach (var row in rowsList) {
+ // row.Element.SetAttributeValue("AccessibleState", row.Element.GetAttributeValue("AccessibleState").ToString().Replace("Collapsed", "Expanded"));
+ //}
+ //if (rowsList.Count>0) {
+ // Ranorex.Row currentRow = rowsList[0];
+ // currentRow.Focus();
+ // currentRow.Select();
+ // currentRow.PressKeys("{Right " + durationPressRightKey + "}");
+ //}
+
}
}
}
Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsWithItemsInProjectExplorer/DragAndDropItemOntoAnotherItem.UserCode.cs
===================================================================
diff -u -rdb9940830293e2ab2cce9f4382b8c3d27a82f27d -r0b0398cbb532e1ab5190b7ca623830700ab846cd
--- System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsWithItemsInProjectExplorer/DragAndDropItemOntoAnotherItem.UserCode.cs (.../DragAndDropItemOntoAnotherItem.UserCode.cs) (revision db9940830293e2ab2cce9f4382b8c3d27a82f27d)
+++ System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsWithItemsInProjectExplorer/DragAndDropItemOntoAnotherItem.UserCode.cs (.../DragAndDropItemOntoAnotherItem.UserCode.cs) (revision 0b0398cbb532e1ab5190b7ca623830700ab846cd)
@@ -15,6 +15,7 @@
using System.Drawing;
using System.Threading;
using WinForms = System.Windows.Forms;
+using Ranorex_Automation_Helpers.UserCodeCollections;
using Ranorex;
using Ranorex.Core;
@@ -33,62 +34,17 @@
{
// Your recording specific initialization code goes here.
}
-
-
- public Ranorex.TreeItem GetTreeItemInProjectExplorerGivenPath(string pathItem, RepoItemInfo rootNodeInfo)
- {
- var stepsPathItem = pathItem.Split('>').ToList();
- var children = rootNodeInfo.FindAdapter().Children;
- // start up variable stepChild
- var stepChild = children[0].As();
- var nameStepChild = NameOfTreeItem(stepChild);
- for (int i=0; i < stepsPathItem.Count; i++) {
- // Find the item corresponding to the step
- var step = stepsPathItem[i];
- if (children.Count(ch => ch.ToString().Contains(step))==1)
- {
- Report.Log(ReportLevel.Info, "Information", "Only one occurrence of '" + step + "' found: choosing item containing the string in its name.");
- stepChild = children.FirstOrDefault(ch => ch.ToString().Contains(step)).As();
- } else {
- Report.Log(ReportLevel.Info, "Information", "Multiple occurrences of '" + step + "' found: choosing item with this exact name.");
- stepChild = children.FirstOrDefault(ch => NameOfTreeItem(ch.As())==step).As();
- }
- //
- if (i != stepsPathItem.Count - 1)
- {
- // Update the children
- children = stepChild.Children;
- // Expand if intermediate node is collased
- var stateIntermediateChild = stepChild.Element.GetAttributeValueText("AccessibleState");
- if (stateIntermediateChild.Contains("Collapsed")) {
- stepChild.Focus();
- stepChild.Expand();
- }
- } else {
- // child is last one in path
- stepChild.Focus();
- stepChild.Select();
- //stepChild.Click(Location.CenterLeft);
- }
- }
- return stepChild;
- }
-
- private string NameOfTreeItem(object treeItemInfo)
- {
- return treeItemInfo.ToString().Substring(10, treeItemInfo.ToString().Length-11);
- }
-
public void DragAndDropProjectExplorerItemOntoAnotherOne(string pathItemToMove, string pathItemDestination, RepoItemInfo rootNodeInfo)
{
- TreeItem treeitemToMove = GetTreeItemInProjectExplorerGivenPath(pathItemToMove, rootNodeInfo);
- TreeItem treeItemDestination = GetTreeItemInProjectExplorerGivenPath(pathItemDestination, rootNodeInfo);
+ TreeItem treeitemToMove = TreeItemHelpers.FindNodeInTree(pathItemToMove, rootNodeInfo, (ti)=>{});
+ TreeItem treeItemDestination = TreeItemHelpers.FindNodeInTree(pathItemDestination, rootNodeInfo, (ti)=>{});
+ Delay.Duration(Duration.FromMilliseconds(1000));
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Down item 'treeitemToMove' at Center.");
treeitemToMove.MoveTo();
Mouse.ButtonDown(System.Windows.Forms.MouseButtons.Left);
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Up item 'treeItemDestination' at Center.");
- treeItemDestination.MoveTo();
+ treeItemDestination.MoveTo(Duration.FromMilliseconds(1000));
Mouse.ButtonUp(System.Windows.Forms.MouseButtons.Left);
}
Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Script27.rxtst
===================================================================
diff -u -rc585df744464d8bf94cd6da19dd14bf3c2d66281 -r0b0398cbb532e1ab5190b7ca623830700ab846cd
--- System tests/AutomatedSystemTests/AutomatedSystemTests/Script27.rxtst (.../Script27.rxtst) (revision c585df744464d8bf94cd6da19dd14bf3c2d66281)
+++ System tests/AutomatedSystemTests/AutomatedSystemTests/Script27.rxtst (.../Script27.rxtst) (revision 0b0398cbb532e1ab5190b7ca623830700ab846cd)
@@ -157,6 +157,7 @@
+
+
+
+
+
+
+
+
@@ -445,52 +466,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -552,52 +527,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ variableid="58f41f8d-e2cb-4ebe-9653-958a0586c5a5"
+ variablename="string4">
+ variableid="3e20cd2e-b0b9-4552-aa14-212a8c9693dc"
+ variablename="string5">
-
-
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="aef0abd0-9b13-4f16-a245-f7f7be97b0d2"
+ variablename="string6">
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="ef20b2eb-ff3a-4087-9fbe-116461e1fd42"
+ variablename="string7">
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ dataname="separatorStepInPath"
+ datasourceid="f1451316-9dcb-4bab-a3f4-64cc7dc145b2"
+ variableid="be7bb929-358e-4961-8102-ba536ad20ae5"
+ variablename="substringToBeReplaced">
+ dataname="replacementChar"
+ datasourceid="e8b8b889-44c1-49f1-908c-d2d2ce4e0e8f"
+ variableid="b1ca51cd-28fb-439f-b68e-18e10d9c5bc8"
+ variablename="substringToReplaceWith">
+ dataname="pathCSVFileCopiedCalculationInCopiedFolder"
+ datasourceid="e8b8b889-44c1-49f1-908c-d2d2ce4e0e8f"
+ variableid="de4c6e03-fcc5-4286-99a5-5964c488d96a"
+ variablename="finalString">
+
+
-
-
-
-
+ variableid="666d8948-5ddb-4a96-976c-bc610318d8eb"
+ variablename="originalString">
-
-
+ dataname="pathCSVFileOriginalCalculation"
+ datasourceid="e8b8b889-44c1-49f1-908c-d2d2ce4e0e8f"
+ variableid="2dfc00fd-73b9-4da3-8f6e-bb765817601f"
+ variablename="filePath1">
+ dataname="pathCSVFileCopiedCalculationInCopiedFolder"
+ datasourceid="e8b8b889-44c1-49f1-908c-d2d2ce4e0e8f"
+ variableid="4b82dd79-7c11-425a-9f41-b9795be8d16b"
+ variablename="filePath2">
-
-
-
-
-
-
-
-
-
-
+
+
@@ -1545,52 +1407,6 @@
name="ImportCalculationsFromReferenceXMLConfigurationFile">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1678,6 +1448,26 @@
id="532261b8-f644-4d4a-a54f-b4a15c5a4c75"
name="ImportCalculationsFromInvalidXMLConfigurationFile">
+
+
+
+
+
+
+
+
@@ -1815,143 +1605,11 @@
name="DuplicateFolderContainingCopiedAndMovedCalculation">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ id="5d63810d-c2ce-4cab-a314-dbc4976cf5a3"
+ name="CloseViewCentralPanelWithFocus"
+ ref="3c2d44f5-31b5-4584-91c8-1ad748affc77"
+ type="Recording">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2130,26 +1788,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="22c872ab-6375-41c9-b6a0-aafb1460c90f"
+ variablename="string3">
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="58f41f8d-e2cb-4ebe-9653-958a0586c5a5"
+ variablename="string4">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2434,52 +1980,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2579,103 +2079,85 @@
-
-
+ variableid="22c872ab-6375-41c9-b6a0-aafb1460c90f"
+ variablename="string3">
-
-
+ dataname="suffixNewStepInPathPE"
+ datasourceid="01df1138-d8e0-42a5-b2f8-57cde58dd5c9"
+ variableid="58f41f8d-e2cb-4ebe-9653-958a0586c5a5"
+ variablename="string4">
+ dataname="nameOfCalculation"
+ datasourceid="9a85db2e-f039-49e7-bed7-f36c802ad6c2"
+ variableid="3e20cd2e-b0b9-4552-aa14-212a8c9693dc"
+ variablename="string5">
+ dataname="suffixNewStepInPathPE"
+ datasourceid="01df1138-d8e0-42a5-b2f8-57cde58dd5c9"
+ variableid="aef0abd0-9b13-4f16-a245-f7f7be97b0d2"
+ variablename="string6">
-
-
-
-
+ variableid="ef20b2eb-ff3a-4087-9fbe-116461e1fd42"
+ variablename="string7">
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="654df330-d33d-4ec2-ace8-87d684f928fc"
+ variablename="string8">
-
-
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="ee7be37b-8468-4cd6-9f9e-b1c3da26aed7"
+ variablename="string9">
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="8062f433-11a0-400c-be02-f4508d8b0956"
+ variablename="string10">
-
-
-
+
+
+
@@ -2818,6 +2300,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3237,6 +2731,26 @@
+
+
+
+
+
+
+
+
@@ -3286,12 +2800,6 @@
variablename="string2">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3431,53 +2995,11 @@
id="b1217f91-ed1a-4e65-a57a-3f853884ce57"
name="a)DuplicationOfCalculations">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -3541,52 +3063,6 @@
name="BuildPathToStandaloneCalculation">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ variableid="22c872ab-6375-41c9-b6a0-aafb1460c90f"
+ variablename="string3">
+ variableid="58f41f8d-e2cb-4ebe-9653-958a0586c5a5"
+ variablename="string4">
-
-
+ dataname="nameOfCalculation"
+ datasourceid="9a85db2e-f039-49e7-bed7-f36c802ad6c2"
+ variableid="3e20cd2e-b0b9-4552-aa14-212a8c9693dc"
+ variablename="string5">
+ dataname="suffixNewStepInPathPE"
+ datasourceid="01df1138-d8e0-42a5-b2f8-57cde58dd5c9"
+ variableid="aef0abd0-9b13-4f16-a245-f7f7be97b0d2"
+ variablename="string6">
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -3910,47 +3385,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -4000,47 +3434,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="22c872ab-6375-41c9-b6a0-aafb1460c90f"
+ variablename="string3">
+ dataname="dummyString"
+ datasourceid="5a447dac-43ba-486d-a727-899f8cfa1363"
+ variableid="58f41f8d-e2cb-4ebe-9653-958a0586c5a5"
+ variablename="string4">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dataname="suffixItem"
+ datasourceid="e8b8b889-44c1-49f1-908c-d2d2ce4e0e8f"
+ variableid="5bab9acc-5817-4baf-921f-3345ba8f8ec3"
+ variablename="string2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4226,27 +3708,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ variableid="be7bb929-358e-4961-8102-ba536ad20ae5"
+ variablename="substringToBeReplaced">
+ dataname="replacementChar"
+ datasourceid="e8b8b889-44c1-49f1-908c-d2d2ce4e0e8f"
+ variableid="b1ca51cd-28fb-439f-b68e-18e10d9c5bc8"
+ variablename="substringToReplaceWith">
+ dataname="pathCSVFileCopiedCalculation"
+ datasourceid="e8b8b889-44c1-49f1-908c-d2d2ce4e0e8f"
+ variableid="de4c6e03-fcc5-4286-99a5-5964c488d96a"
+ variablename="finalString">
-
-
+ variableid="666d8948-5ddb-4a96-976c-bc610318d8eb"
+ variablename="originalString">
+
+
+ dataname="fullPathToItem"
+ datasourceid="05c7d841-1f62-40cb-bf4e-e182b491b47d"
+ variableid="666d8948-5ddb-4a96-976c-bc610318d8eb"
+ variablename="originalString">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -4728,11 +4116,12 @@
name="ValidateCopiesOfCalculation">
+ dataname="nameOriginalCalculation"
+ datasourceid="e9f97e7e-0679-44f7-91f3-fdc9ab5754bc"
+ variableid="58f41f8d-e2cb-4ebe-9653-958a0586c5a5"
+ variablename="string4">
+ variableid="22c872ab-6375-41c9-b6a0-aafb1460c90f"
+ variablename="string3">
@@ -5008,50 +4397,18 @@
name="ValidateThatStructureCalculationsIsTheSame">
+ id="fe822eb1-7e81-4560-9fb9-e1279d1568c4"
+ name="SelectState"
+ ref="c80e171a-4479-4f25-8072-e92859e1fa11"
+ type="Recording">
+ dataname="StateToSelect"
+ datasourceid="cc424860-240c-45fb-bf96-a4acb7107b6e"
+ variableid="dd230550-3763-4882-aad6-2c842903d448"
+ variablename="StateToSelect">
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5429,21 +4922,9 @@
id="b52653fe-ef2e-40f0-93d4-b0131df6c708"
name="BuildPathToStandaloneCalculation">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -5636,22 +5097,10 @@
id="064ed4b4-7572-4f45-b638-4bd97dda4fbf"
name="SingleCalculation">
-
-
-
-
-
-
@@ -5672,30 +5121,10 @@
id="00f72754-ea57-4dfb-8707-06f8f8813718"
name="CalculationInsideFolder">
-
-
-
-
-
-
-
-
-
-
@@ -5832,22 +5261,10 @@
id="88a8f33c-27b2-442e-b5e0-8f5a40fd3d53"
name="StandAloneCalculation">
-
-
-
-
-
-
@@ -5868,30 +5285,10 @@
id="2afb400f-4ec3-48bb-a1fd-27eac9da685c"
name="CalculationInsideFolder">
-
-
-
-
-
-
-
-
-
-
@@ -6965,81 +6362,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ id="71368129-2d40-497b-9085-185e0aaacce2">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ id="aba10684-1384-4446-83a2-9e87e2734f46">
+ id="b1217f91-ed1a-4e65-a57a-3f853884ce57">
+ id="b14ee891-742f-4cea-9dd5-2b7c62b2d8a7">
+ id="cc424860-240c-45fb-bf96-a4acb7107b6e">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-