public void ValidateEnabledGenericCellResultsView(RepoItemInfo cellInfo, string IsEnabledExpected)
        {
            int             startX           = isEnabledExpected == "true"?5:0;
            CompressedImage genericCellPatch = repo.RiskeerMainWindow.ContainerMultipleViews.DocumentViewContainer.FM_ResultView.TableFMResultView.Row.genericCellInfo.GetGreyWhitePatch(new Rectangle(startX, 0, 3, 17));

            Imaging.FindOptions genericCellPatchOptions = Imaging.FindOptions.Default;
            Report.Log(ReportLevel.Info, "Validation", "Validating ContainsImage (Screenshot: 'greyPatch1' with region {X=0,Y=1,Width=3,Height=17}) on item 'cellInfo'.", cellInfo);
            Validate.ContainsImage(cellInfo, genericCellPatch, genericCellPatchOptions);
        }
예제 #2
0
 public void CheckDHSIconImage()
 {
     // get the screenshot from the repository
     Bitmap MyScreenshot  =  Imaging.Load(@"C:\DHSIcon.jpg");
     // create FindOptions with similarity set to 95%
     Imaging.FindOptions MyFindOptions  =  new Imaging.FindOptions(0.95);
     // compare the captured screenshot with the actual list item
     Validate.CompareImage(repo.Desktop.DellHelpSupportIconInfo,  MyScreenshot,  MyFindOptions);
 }
예제 #3
0
        public void CheckControlImage(String imageName)
        {
            Imaging.FindOptions fOpt = new Imaging.FindOptions();
            fOpt.Similarity = 0.95;

            var expectedBitmap = new Bitmap(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "ChartViewer", "Images", imageName));

            Validate.ContainsImage(repo.TestChartViewWindow.PARTMainGridInfo,
                                   expectedBitmap,
                                   fOpt,
                                   String.Format("Validate chart {0} matches with expected result", imageName));
        }
        private void TypeColon()
        {
            int count = 0;

            Validate.Options    myOptions     = new Validate.Options(false, ReportLevel.Info);
            Imaging.FindOptions myFindOptions = new Imaging.FindOptions(1);

            Report.Log(ReportLevel.Info, "Keyboard", "RunMobileImport\r\nKey sequence '{RShiftKey down}'.", new RecordItemIndex(3));
            Keyboard.Press("{RShiftKey down}");
            Delay.Milliseconds(300);

            Report.Log(ReportLevel.Info, "Delay", "Waiting for 1000ms.", new RecordItemIndex(4));
            Delay.Duration(1000, false);

            Report.Log(ReportLevel.Info, "Keyboard", "RunMobileImport\r\nKey sequence ':'.", new RecordItemIndex(5));
            Keyboard.Press(":");
            Delay.Milliseconds(300);

            Report.Log(ReportLevel.Info, "Delay", "Waiting for 1000ms.", new RecordItemIndex(6));
            Delay.Duration(1000, false);

            Report.Log(ReportLevel.Info, "Keyboard", "RunMobileImport\r\nKey sequence '{RShiftKey up}'.", new RecordItemIndex(7));
            Keyboard.Press("{RShiftKey up}");
            Delay.Milliseconds(300);

            while (!Validate.ContainsImage(repo.QaAutomationQaAutomationRemoteD.OPWindowClassInfo, repo.QaAutomationQaAutomationRemoteD.OPWindowClassInfo.GetScreenshot6(new Rectangle(25, 1000, 15, 15)), myFindOptions, "Validating that the colon exists", myOptions) && count < 5)
            {
                Report.Log(ReportLevel.Info, "Keyboard", "RunMobileImport\r\nKey sequence '{Back}'.", new RecordItemIndex(7));
                Keyboard.Press("{Back}");
                Delay.Milliseconds(300);

                Report.Log(ReportLevel.Info, "Keyboard", "RunMobileImport\r\nKey sequence '{RShiftKey down}'.", new RecordItemIndex(3));
                Keyboard.Press("{RShiftKey down}");
                Delay.Milliseconds(300);

                Report.Log(ReportLevel.Info, "Delay", "Waiting for 1000ms.", new RecordItemIndex(4));
                Delay.Duration(1000, false);

                Report.Log(ReportLevel.Info, "Keyboard", "RunMobileImport\r\nKey sequence ':'.", new RecordItemIndex(5));
                Keyboard.Press(":");
                Delay.Milliseconds(300);

                Report.Log(ReportLevel.Info, "Delay", "Waiting for 1000ms.", new RecordItemIndex(6));
                Delay.Duration(1000, false);

                Report.Log(ReportLevel.Info, "Keyboard", "RunMobileImport\r\nKey sequence '{RShiftKey up}'.", new RecordItemIndex(7));
                Keyboard.Press("{RShiftKey up}");
                Delay.Milliseconds(300);

                count++;
            }
        }
예제 #5
0
파일: Steps.cs 프로젝트: nareshbandi123/ads
 public static void ValidateSubtotaleColorchart()
 {
     try
     {
         repo.VisualAnalyticsVATestsVizxAsteri.Self.Maximize();
         CompressedImage     tableChart = repo.VisualAnalyticsVATestsVizxAsteri.PivotTableOverlayPanelInfo.GetSubTotalColorChart();
         Imaging.FindOptions options    = Imaging.FindOptions.Default;
         options.Similarity = Configuration.Config.SIMILARITY;
         RepoItemInfo info = repo.VisualAnalyticsVATestsVizxAsteri.PivotTableOverlayPanelInfo;
         Validate.ContainsImage(info, tableChart, options, "Subtotal chart image comparision", false);
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateSubtotaleColorchart  : " + ex.Message);
     }
 }
예제 #6
0
 public static void ValidateFreightdragtoRowChart()
 {
     try
     {
         CompressedImage     LineChart = repo.VisualAnalyticsVATestsVizxAsteri.BIChartOverlayPanelInfo.GetFreightDragtoRowChart();
         Imaging.FindOptions options   = Imaging.FindOptions.Default;
         options.Similarity = Configuration.Config.SIMILARITY;
         RepoItemInfo info = repo.VisualAnalyticsVATestsVizxAsteri.BIChartOverlayPanelInfo;
         Validate.ContainsImage(info, LineChart, options, "After Freight drag to RowChart data image comparision", false);
         Reports.ReportLog("Validate Freight drag to RowChart", Reports.ADSReportLevel.Success, null, Configuration.Config.TestCaseName);
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : DragFreighttoRowDeck  : " + ex.Message);
     }
 }
예제 #7
0
파일: Steps.cs 프로젝트: nareshbandi123/ads
 public static void ValidateHighlightTable()
 {
     try
     {
         repo.VisualAnalyticsVATestsVizxAsteri.Self.Maximize();
         CompressedImage     tableChart = repo.VisualAnalyticsVATestsVizxAsteri.PivotTableOverlayPanelInfo.GetHighlightTable();
         Imaging.FindOptions options    = Imaging.FindOptions.Default;
         options.Similarity = Configuration.Config.SIMILARITY;
         RepoItemInfo info = repo.VisualAnalyticsVATestsVizxAsteri.PivotTableOverlayPanelInfo;
         System.Threading.Thread.Sleep(1000);
         Validate.ContainsImage(info, tableChart, options, "Validate chart image comparision", false);
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateHighlightTable  : " + ex.Message);
     }
 }
예제 #8
0
 public static void VerifyMemoryViewInResources()
 {
     try
     {
         if (repo.SQLdm.TableLayoutPanelInfo.Exists())
         {
             CompressedImage     rsMemory = repo.SQLdm.TableLayoutPanelInfo.GetRESMemory();
             Imaging.FindOptions options  = Imaging.FindOptions.Default;
             RepoItemInfo        info     = repo.SQLdm.TableLayoutPanelInfo;
             bool isvalid = Validate.ContainsImage(info, rsMemory, options, "Memory View image comparision in Resources Tab", false);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : VerifyMemoryViewInResources  : " + ex.Message);
     }
 }
예제 #9
0
파일: Steps.cs 프로젝트: nareshbandi123/ads
 public static void ValidateAfterClickonAbsoluteValues()
 {
     try
     {
         if (repo.VAWindow.VisulizationWindowInfo.Exists())
         {
             CompressedImage     TreeMap = repo.VAWindow.VisulizationWindowInfo.GetAbsoluteValues();
             Imaging.FindOptions options = Imaging.FindOptions.Default;
             RepoItemInfo        info    = repo.VAWindow.VisulizationWindowInfo;
             bool isvalid = Validate.ContainsImage(info, TreeMap, options, "After click on absolute values image comparision", false);
             Reports.ReportLog("ValidateAfterClickonAbsoluteValues", Reports.ADSReportLevel.Success, null, Configuration.Config.TestCaseName);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateAfterClickonAbsoluteValues : " + ex.Message);
     }
 }
예제 #10
0
 public static void ValidateAfterChangetoTriangle1()
 {
     try
     {
         if (repo.VAWindow.VisualizationWindowInfo.Exists())
         {
             CompressedImage     SymboMapShape = repo.VAWindow.VisualizationWindowInfo.GetChangetoTriangleShape1();
             Imaging.FindOptions options       = Imaging.FindOptions.Default;
             RepoItemInfo        info          = repo.VAWindow.VisualizationWindowInfo;
             bool isvalid = Validate.ContainsImage(info, SymboMapShape, options, "Tree map image data validation", false);
             Reports.ReportLog("ValidateAfterChangetoTriangle1", Reports.ADSReportLevel.Success, null, Configuration.Config.TestCaseName);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateAfterChangetoTriangle1 : " + ex.Message);
     }
 }
예제 #11
0
 public static void ValidationAfterClickonUniformHeight()
 {
     try
     {
         if (repo.VAWindow.VisualizationWindowInfo.Exists())
         {
             CompressedImage     FunnelMap = repo.VAWindow.VisualizationWindowInfo.GetUniformHeightOption();
             Imaging.FindOptions options   = Imaging.FindOptions.Default;
             RepoItemInfo        info      = repo.VAWindow.VisualizationWindowInfo;
             bool isvalid = Validate.ContainsImage(info, FunnelMap, options, "After Click on Uniform Height image data validation", false);
             Reports.ReportLog("ValidationAfterClickonUniformHeight", Reports.ADSReportLevel.Success, null, Configuration.Config.TestCaseName);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidationAfterClickonUniformHeight : " + ex.Message);
     }
 }
예제 #12
0
 public static void ValidateUnstackedOptionChart()
 {
     try
     {
         repo.VATest.Self.Maximize();
         if (repo.VATest.BIChartOverlayPanelInfo.Exists())
         {
             CompressedImage     AreaChart = repo.VATest.BIChartOverlayPanelInfo.GetUnstackedOption();
             Imaging.FindOptions options   = Imaging.FindOptions.Default;
             options.Similarity = Configuration.Config.SIMILARITY;
             RepoItemInfo info = repo.VATest.BIChartOverlayPanelInfo;
             Validate.ContainsImage(info, AreaChart, options, "Unstacked Option data image comparision", false);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateUnstackedOptionChart  : " + ex.Message);
     }
 }
예제 #13
0
파일: Steps.cs 프로젝트: nareshbandi123/ads
 public static void ValidateVAtestsdataWindow()
 {
     try
     {
         if (repo.VisualAnalyticsVATestsVizxAsteri.StartWindowInfo.Exists())
         {
             CompressedImage     tableChart = repo.VisualAnalyticsVATestsVizxAsteri.StartWindowInfo.GetVizxDataWindow();
             Imaging.FindOptions options    = Imaging.FindOptions.Default;
             options.Similarity = Configuration.Config.SIMILARITY;
             RepoItemInfo info = repo.VisualAnalyticsVATestsVizxAsteri.StartWindowInfo;
             System.Threading.Thread.Sleep(5000);
             Validate.ContainsImage(info, tableChart, options, "VA-tests.vizx data image comparision", false);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateVAtestsdataWindow  : " + ex.Message);
     }
 }
예제 #14
0
파일: Steps.cs 프로젝트: nareshbandi123/ads
 public static void ValidateSliderMinimumChart()
 {
     try
     {
         repo.VATest.Self.Maximize();
         if (repo.VATest.BIChartOverlayPanelInfo.Exists())
         {
             CompressedImage     ShapeChart = repo.VATest.BIChartOverlayPanelInfo.GetSlidermovetoMinimum();
             Imaging.FindOptions options    = Imaging.FindOptions.Default;
             options.Similarity = Configuration.Config.SIMILARITY;
             RepoItemInfo info = repo.VATest.BIChartOverlayPanelInfo;
             Validate.ContainsImage(info, ShapeChart, options, "After Slider move to Minimum ShapeChart image comparision", false);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateSliderMinimumChart  : " + ex.Message);
     }
 }
예제 #15
0
파일: Steps.cs 프로젝트: nareshbandi123/ads
 public static void ValidateTreeMapFile()
 {
     try
     {
         repo.VAWindow.Self.Maximize();
         if (repo.VAWindow.VisulizationWindowInfo.Exists())
         {
             CompressedImage     TreeMap = repo.VAWindow.VisulizationWindowInfo.GetTreeMapData();
             Imaging.FindOptions options = Imaging.FindOptions.Default;
             RepoItemInfo        info    = repo.VAWindow.VisulizationWindowInfo;
             bool isvalid = Validate.ContainsImage(info, TreeMap, options, "Tree map image data validation", false);
             Reports.ReportLog("ValidateTreeMapFile", Reports.ADSReportLevel.Success, null, Configuration.Config.TestCaseName);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateTreeMapFile : " + ex.Message);
     }
 }
예제 #16
0
 public static void ValidateMergedSharedscaleChart()
 {
     try
     {
         repo.VisualAnalyticsVATestsVizxAsteri.Self.Maximize();
         if (repo.VisualAnalyticsVATestsVizxAsteri.BIChartOverlayPanelInfo.Exists())
         {
             CompressedImage     LineChart = repo.VisualAnalyticsVATestsVizxAsteri.BIChartOverlayPanelInfo.GetMergeSharedscaleOption();
             Imaging.FindOptions options   = Imaging.FindOptions.Default;
             options.Similarity = Configuration.Config.SIMILARITY;
             RepoItemInfo info = repo.VisualAnalyticsVATestsVizxAsteri.BIChartOverlayPanelInfo;
             Validate.ContainsImage(info, LineChart, options, " MergeShared scale Option data validate", false);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateMergedSharedscaleChart  : " + ex.Message);
     }
 }
예제 #17
0
 public static void ValidateDualAxesOptionChart()
 {
     try
     {
         repo.VisualAnalyticsVATestsVizxAsteri.Self.Maximize();
         if (repo.VisualAnalyticsVATestsVizxAsteri.BIChartOverlayPanelInfo.Exists())
         {
             CompressedImage     BarChart = repo.VisualAnalyticsVATestsVizxAsteri.BIChartOverlayPanelInfo.GetDualAxesOptionChart();
             Imaging.FindOptions options  = Imaging.FindOptions.Default;
             options.Similarity = Configuration.Config.SIMILARITY;
             RepoItemInfo info = repo.VisualAnalyticsVATestsVizxAsteri.BIChartOverlayPanelInfo;
             Validate.ContainsImage(info, BarChart, options, "DualAxes Option Chart data image comparision", false);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateDualAxesOptionChart  : " + ex.Message);
     }
 }
예제 #18
0
파일: Steps.cs 프로젝트: nareshbandi123/ads
 public static void ValidateDragProducttoShapeChart()
 {
     try
     {
         repo.VATest.Self.Maximize();
         if (repo.VATest.BIChartOverlayPanelInfo.Exists())
         {
             CompressedImage     ShapeChart = repo.VATest.BIChartOverlayPanelInfo.GetDragProducttoShapeDeck();
             Imaging.FindOptions options    = Imaging.FindOptions.Default;
             options.Similarity = Configuration.Config.SIMILARITY;
             RepoItemInfo info = repo.VATest.BIChartOverlayPanelInfo;
             System.Threading.Thread.Sleep(5000);
             Validate.ContainsImage(info, ShapeChart, options, "After Drag Product to ShapeDeck ShapeChart image comparision", false);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ValidateDragProducttoShapeChart  : " + ex.Message);
     }
 }