コード例 #1
0
        public void Learn()
        {
            ClearStopLearning();
            PrepareLearningConfigurations();
            LearnScreenShot();
            POM.PageURL = ((DriverBase)Agent.Driver).GetURL();
            POM.Name    = IWindowExplorerDriver.GetActiveWindow().Title;

            // appending Specific frame title in POM name
            if (!string.IsNullOrEmpty(SpecificFramePath))
            {
                var frame = IWindowExplorerDriver.GetWindowAllFrames().Where(x => x.Path.Equals(SpecificFramePath)).FirstOrDefault();

                if (frame != null)
                {
                    POM.Name = string.Concat(POM.Name, " : ", frame.Title);
                }
            }

            POM.MappedUIElements.Clear();
            POM.UnMappedUIElements.Clear();
            mElementsList.Clear();
            if (LearnOnlyMappedElements)
            {
                if (SelectedElementTypesList.Count > 0)
                {
                    IWindowExplorerDriver.GetVisibleControls(SelectedElementTypesList, mElementsList, true, SpecificFramePath);
                }
            }
            else
            {
                IWindowExplorerDriver.GetVisibleControls(null, mElementsList, true, SpecificFramePath);
            }
        }
コード例 #2
0
 public void Learn()
 {
     ClearStopLearning();
     PrepareLearningConfigurations();
     LearnScreenShot();
     POM.PageURL = ((DriverBase)Agent.Driver).GetURL();
     POM.Name    = IWindowExplorerDriver.GetActiveWindow().Title;
     POM.MappedUIElements.Clear();
     POM.UnMappedUIElements.Clear();
     mElementsList.Clear();
     IWindowExplorerDriver.GetVisibleControls(null, mElementsList, true);
 }
コード例 #3
0
ファイル: PomLearnUtils.cs プロジェクト: linuxerlj/Ginger
 public void Learn()
 {
     ClearStopLearning();
     PrepareLearningConfigurations();
     LearnScreenShot();
     POM.PageURL = ((DriverBase)Agent.Driver).GetURL();
     POM.Name    = IWindowExplorerDriver.GetActiveWindow().Title;
     POM.MappedUIElements.Clear();
     POM.UnMappedUIElements.Clear();
     mElementsList.Clear();
     if (LearnOnlyMappedElements)
     {
         IWindowExplorerDriver.GetVisibleControls(AutoMapElementTypesList.Where(x => x.Selected).ToList().Select(y => y.ElementType).ToList(), mElementsList, true);
     }
     else
     {
         IWindowExplorerDriver.GetVisibleControls(null, mElementsList, true);
     }
 }
コード例 #4
0
 public void Learn()
 {
     ClearStopLearning();
     PrepareLearningConfigurations();
     LearnScreenShot();
     POM.PageURL = ((DriverBase)Agent.Driver).GetURL();
     POM.Name    = IWindowExplorerDriver.GetActiveWindow().Title;
     POM.MappedUIElements.Clear();
     POM.UnMappedUIElements.Clear();
     mElementsList.Clear();
     if (LearnOnlyMappedElements)
     {
         if (SelectedElementTypesList.Count > 0)
         {
             IWindowExplorerDriver.GetVisibleControls(SelectedElementTypesList, mElementsList, true, SpecificFramePath);
         }
     }
     else
     {
         IWindowExplorerDriver.GetVisibleControls(null, mElementsList, true, SpecificFramePath);
     }
 }