Ejemplo n.º 1
0
        public void ClickOnBibliographyImage()
        {
            const string targetImagePath = Constants.ImageTemplateFilesLocations.ImageTemplatesPath + "Bibliography.png";

            Sleep(10);
            Screenshot   screenshotString = ScreenshotManager.GetScreenshot();
            MemoryStream streamBitmap     = new MemoryStream(screenshotString.AsByteArray);
            Bitmap       sourceImage      = new Bitmap(Image.FromStream(streamBitmap));
            Point        coordinate       = ImageSearchEngine.ImageCoordinateFinder.GetTargetImagePosition(sourceImage, targetImagePath);

            ClickByCoordinates(coordinate.X + 1, coordinate.Y + 1);
        }
Ejemplo n.º 2
0
        public void ClickOnBibliographyImage()
        {
            const string targetImagePath = "Bibliography.png";

            Logger.Log("image path: " + targetImagePath, LogType.MessageWithoutScreenshot);
            Sleep(10);
            Screenshot   screenshotString = ScreenshotManager.GetScreenshot();
            MemoryStream streamBitmap     = new MemoryStream(screenshotString.AsByteArray);
            Bitmap       sourceImage      = new Bitmap(Image.FromStream(streamBitmap));
            Point        coordinate       = ImageSearchEngine.ImageCoordinateFinder.GetTargetImagePosition(sourceImage, targetImagePath);

            ClickByCoordinates(coordinate.X + 1, coordinate.Y + 1);
        }