Exemplo n.º 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);
     }
 }
Exemplo n.º 2
0
        public override void Finish()
        {
            mPomLearnUtils.SaveLearnedPOM();

            //close all Agents raised in Wizard
            CloseStartedAgents();
        }