示例#1
0
        public async Task LearnDelta()
        {
            try
            {
                IsLearning = true;
                mIWindowExplorerDriver.UnHighLightElements();
                ((DriverBase)((AgentOperations)Agent.AgentOperations).Driver).StopProcess = false;
                POMElementsCopy.Clear();
                DeltaViewElements.Clear();
                PomLearnUtils.PrepareLearningConfigurations();
                PomLearnUtils.LearnScreenShot();//this will set screen size to be same as in learning time
                PrepareCurrentPOMElementsData();
                if (PomLearnUtils.LearnOnlyMappedElements)
                {
                    List <eElementType> selectedElementList = GetSelectedElementList();

                    await mIWindowExplorerDriver.GetVisibleControls(selectedElementList, POMLatestElements, true, SpecificFramePath, GetRelativeXpathTemplateList());
                }
                else
                {
                    await mIWindowExplorerDriver.GetVisibleControls(null, POMLatestElements, true, SpecificFramePath, GetRelativeXpathTemplateList());
                }
                SetUnidentifiedElementsDeltaDetails();
                DoEndOfRelearnElementsSorting();
            }
            finally
            {
                IsLearning = false;
            }
        }
示例#2
0
 public void LearnDelta()
 {
     try
     {
         IsLearning = true;
         mIWindowExplorerDriver.UnHighLightElements();
         ((DriverBase)Agent.Driver).mStopProcess = false;
         POMElementsCopy.Clear();
         DeltaViewElements.Clear();
         PomLearnUtils.PrepareLearningConfigurations();
         PomLearnUtils.LearnScreenShot();//this will set screen size to be same as in learning time
         PrepareCurrentPOMElementsData();
         if (PomLearnUtils.LearnOnlyMappedElements)
         {
             mIWindowExplorerDriver.GetVisibleControls(PomLearnUtils.AutoMapElementTypesList.Where(x => x.Selected).Select(y => y.ElementType).ToList(), POMLatestElements, true);
         }
         else
         {
             mIWindowExplorerDriver.GetVisibleControls(null, POMLatestElements, true);
         }
         SetUnidentifiedElementsDeltaDetails();
         DoEndOfRelearnElementsSorting();
     }
     finally
     {
         IsLearning = false;
     }
 }
示例#3
0
 public void LearnDelta()
 {
     try
     {
         IsLearning = true;
         mIWindowExplorerDriver.UnHighLightElements();
         ((DriverBase)Agent.Driver).mStopProcess = false;
         POMElementsCopy.Clear();
         DeltaViewElements.Clear();
         PomLearnUtils.PrepareLearningConfigurations();
         PomLearnUtils.LearnScreenShot();//this will set screen size to be same as in learning time
         PrepareCurrentPOMElementsData();
         mIWindowExplorerDriver.GetVisibleControls(null, POMLatestElements, true);
         SetUnidentifiedElementsDeltaDetails();
         DoEndOfRelearnElementsSorting();
     }
     finally
     {
         IsLearning = false;
     }
 }