public void AssociateThenCancel(AssociateTagData input)
        {
            //navigate and select node
            AssociateOnWhichNode(input);

            Association.ClickAssociateTagButton();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();

            //Do not select tag and click "Cancel" button directly
            Association.ClickCancelButton();
            TimeManager.ShortPause();

            //verify go back to the previous page
            Assert.IsTrue(Association.IsAssociateTagButtonDisplayed());

            //Select 2 tags and cancel
            Association.ClickAssociateTagButton();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            Association.CheckedTags(input.InputData.TagNames);
            Association.ClickCancelButton();
            TimeManager.ShortPause();

            //verify go back to the previous page
            Assert.IsTrue(Association.IsAssociateTagButtonDisplayed());
        }
        public void DisassociateTagVerify(AssociateTagData input)
        {
            int i = 0;

            while (i <= 3)
            {
                AssociateSettings.NavigateToHierarchyAssociate();
                string[] HierarchyNewPath = new string[i + 1];
                Array.Copy(input.InputData.HierarchyNodePath, HierarchyNewPath, i + 1);
                Assert.IsTrue(AssociateSettings.SelectHierarchyNodePath(HierarchyNewPath));
                //AssociateSettings.SelectHierarchyNode(input.InputData.HierarchyNodePath[i]);
                //Navigate to system dimension node and disassociate ptag
                //Select one hierarchy building node, select a associated tag and click  '解除关联'  button.
                AssociateSettings.FocusOnTag(input.InputData.TagNames[i]);
                AssociateSettings.ClickDisassociateButton(input.InputData.TagNames[i]);
                JazzMessageBox.LoadingMask.WaitLoading();
                TimeManager.ShortPause();
                // It disappears from the associated grid and it appears in the unassociated grid;
                Assert.IsFalse(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[i]));
                AssociateSettings.ClickAssociateTagButton();
                JazzMessageBox.LoadingMask.WaitSubMaskLoading();
                TimeManager.MediumPause();
                Assert.IsTrue(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[i]));
                //Associate this tag again
                AssociateSettings.CheckedTag(input.InputData.TagNames[i]);
                AssociateSettings.ClickAssociateButton();
                JazzMessageBox.LoadingMask.WaitLoading();
                TimeManager.MediumPause();
                Assert.IsTrue(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[i]));
                AssociateSettings.ClickAssociateTagButton();
                JazzMessageBox.LoadingMask.WaitSubMaskLoading();
                TimeManager.MediumPause();
                Assert.IsFalse(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[i]));
                AssociateSettings.ClickCancelButton();
                JazzMessageBox.LoadingMask.WaitSubMaskLoading();
                TimeManager.MediumPause();
                //Go to Energy Usage Analysis, select above hierarchy node then select ‘全部数据点’ try to find the above tag.

                AssociateSettings.NavigateToEnergyAnalysis();
                JazzFunction.EnergyAnalysisPanel.SelectHierarchy(HierarchyNewPath);
                JazzFunction.EnergyAnalysisPanel.SwitchTagTab(TagTabs.HierarchyTag);
                TimeManager.ShortPause();
                JazzFunction.EnergyAnalysisPanel.WaitTagListAppear(10);
                TimeManager.LongPause();
                Assert.IsTrue(JazzFunction.EnergyAnalysisPanel.IsTagOnListByName(input.InputData.TagNames[i]));

                i++;
            }
        }
        public void MarkedElectricTags(AssociateTagData input)
        {
            //Select a building node, then select an associated tag
            AssociateSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            AssociateSettings.FocusOnVTagByName(input.InputData.TagNames[0]);
            AssociateSettings.LightenTag(input.InputData.TagNames[0]);
            Assert.IsTrue(AssociateSettings.IsTagLighted(input.InputData.TagNames[0]));
            AssociateSettings.LightenTag(input.InputData.TagNames[1]);

            Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.InputData.TagName));
            JazzMessageBox.MessageBox.Close();
            TimeManager.ShortPause();
            //Disassociate Ptag1, then light Ptag2 again.
            AssociateSettings.FocusOnVTagByName(input.InputData.TagNames[0]);
            AssociateSettings.ClickDisassociateButton(input.InputData.TagNames[0]);
            AssociateSettings.LightenTag(input.InputData.TagNames[1]);
            Assert.IsTrue(AssociateSettings.IsTagLighted(input.InputData.TagNames[1]));
            //Disassociate Ptag2, then associate Ptag2 to one system dimension node under this building node.
            AssociateSettings.FocusOnVTagByName(input.InputData.TagNames[1]);
            AssociateSettings.ClickDisassociateButton(input.InputData.TagNames[1]);
            AssociateSettings.NavigateToSystemDimensionAssociate();
            //SystemNodeSettings.ShowHierarchyTree();
            //SystemNodeSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            SystemNodeSettings.SelectSystemDimensionNodePath(input.InputData.SystemDimensionPath);
            AssociateSettings.ClickAssociateTagButton();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();
            AssociateSettings.CheckedTag(input.InputData.TagNames[1]);
            AssociateSettings.ClickAssociateButton();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();
            //The flag turn light if there are no tag whose commodity is electricity is lighted in the same system dimension node.
            AssociateSettings.LightenTag(input.InputData.TagNames[1]);
            Assert.IsTrue(AssociateSettings.IsTagLighted(input.InputData.TagNames[1]));
        }