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);
     }
 }
Beispiel #2
0
 public void StopRecording()
 {
     try
     {
         PlatformDriver.StopRecording();
         if (ListPOMObjectHelper != null)
         {
             foreach (var cPom in ListPOMObjectHelper)
             {
                 //if (!string.IsNullOrEmpty(cPom.PageTitle) && !string.IsNullOrEmpty(cPom.PageURL))
                 //{
                 //    try
                 //    {
                 //        WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(cPom.ApplicationPOM);
                 //    }
                 //    catch (Exception e)
                 //    {
                 //        Reporter.ToLog(eLogLevel.ERROR, "Error while saving the POM", e);
                 //    }
                 //}
                 WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(cPom.ApplicationPOM);
             }
         }
     }
     catch (Exception ex)
     {
         Reporter.ToLog(eLogLevel.ERROR, "Error in Stop recording", ex);
     }
 }
 public void StopRecording()
 {
     try
     {
         PlatformDriver.StopRecording();
         if (ListPOMObjectHelper != null)
         {
             foreach (var cPom in ListPOMObjectHelper)
             {
                 WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(cPom.ApplicationPOM);
             }
         }
     }
     catch (Exception ex)
     {
         Reporter.ToLog(eLogLevel.ERROR, "Error in Stop recording", ex);
     }
 }