예제 #1
0
 public void StopRecording()
 {
     try
     {
         PlatformDriver.StopRecording();
         if (ListPOMObjectHelper != null)
         {
             RepositoryFolder <ApplicationPOMModel> repositoryFolder = WorkSpace.Instance.SolutionRepository.GetRepositoryItemRootFolder <ApplicationPOMModel>();
             foreach (var cPom in ListPOMObjectHelper)
             {
                 if (!string.IsNullOrEmpty(cPom.PageTitle) && !string.IsNullOrEmpty(cPom.PageURL))
                 {
                     try
                     {
                         PomLearnUtils utils = new PomLearnUtils(cPom.ApplicationPOM);
                         cPom.ApplicationPOM.ContainingFolder         = repositoryFolder.FolderRelativePath;
                         cPom.ApplicationPOM.ContainingFolderFullPath = repositoryFolder.FolderFullPath;
                         utils.SaveLearnedPOM();
                     }
                     catch (Exception e)
                     {
                         WorkSpace.Instance.SolutionRepository.AddRepositoryItem(cPom.ApplicationPOM);
                         Reporter.ToLog(eLogLevel.ERROR, "Error while saving the POM", e);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Reporter.ToLog(eLogLevel.ERROR, "Error in Stop recording", ex);
     }
 }
예제 #2
0
 public PomDeltaUtils(ApplicationPOMModel pom, Agent agent)
 {
     POM           = pom;
     Agent         = agent;
     PomLearnUtils = new PomLearnUtils(pom, agent);
     POMLatestElements.CollectionChanged += ElementsListCollectionChanged;
 }
예제 #3
0
        public AddPOMWizard(RepositoryFolder <ApplicationPOMModel> pomModelsFolder = null)
        {
            mPomLearnUtils = new PomLearnUtils(new ApplicationPOMModel(), pomModelsFolder: pomModelsFolder);

            AddPage(Name: "Introduction", Title: "Introduction", SubTitle: "Page Objects Model Introduction", Page: new WizardIntroPage("/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/AddPOMIntro.md"));

            AddPage(Name: "Learning Configurations", Title: "Learning Configurations", SubTitle: "Page Objects Learning Configurations", Page: new POMLearnConfigWizardPage());

            AddPage(Name: "Learned Objects Mapping", Title: "Learned Objects Mapping", SubTitle: "Map Learned Page Objects", Page: new POMObjectsMappingWizardPage());

            AddPage(Name: "General Details", Title: "General Details", SubTitle: "New Page Objects Model General Details", Page: new POMGeneralDetailsWizardPage());
        }