Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
        private void xAgentWindowsComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (IWindowExplorerDriver == null)
            {
                return;
            }

            AppWindow page = (AppWindow)xAgentWindowsComboBox.SelectedItem;

            if (page == null)
            {
                return;
            }
            IWindowExplorerDriver.SwitchWindow(page.Title);
        }
Ejemplo n.º 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)
     {
         IWindowExplorerDriver.GetVisibleControls(AutoMapElementTypesList.Where(x => x.Selected).ToList().Select(y => y.ElementType).ToList(), mElementsList, true);
     }
     else
     {
         IWindowExplorerDriver.GetVisibleControls(null, mElementsList, true);
     }
 }
Ejemplo n.º 5
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);
     }
 }
Ejemplo n.º 6
0
 public void LearnScreenShot()
 {
     IWindowExplorerDriver.UnHighLightElements();
     ScreenShot = ((IVisualTestingDriver)Agent.Driver).GetScreenShot(new Tuple <int, int>(ApplicationPOMModel.cLearnScreenWidth, ApplicationPOMModel.cLearnScreenHeight));
 }