Example #1
0
        public void ThenUserShouldClickOnDownloadLinkForDownloadingPdfFile()
        {
            try
            {
                SelectBrowser.driver.SwitchTo().Window(SelectBrowser.driver.WindowHandles.Last());
                //Assert.IsTrue(SelectBrowser.driver.Url.Contains("w9form"));
                using (var session = Sikuli.CreateSession())
                {
                    var down_text   = Patterns.FromFile(@"C:\Users\Anuruddha.Tiwari\source\repos\ThomasNetProject\ThomasNetProject\Images\DownloadButton.PNG", 0.9f);
                    var save_button = Patterns.FromFile(@"C:\Users\Anuruddha.Tiwari\source\repos\ThomasNetProject\ThomasNetProject\Images\SaveButton.PNG", 0.9f);
                    session.Wait(down_text, 500);
                    session.Click(down_text);
                    test.Log(Status.Pass, "User Clicks on the Download Button");
                    session.Wait(save_button, 500);
                    session.Click(save_button);
                    test.Log(Status.Pass, "User Clicks on the Save Button");
                }

                //Assert.IsTrue(PDFReaderP.ExtractPDF(@"C:\Users\ankit.kansal\Downloads\ReconReport_V9.pdf").Contains("Account"));
            }
            catch (AssertFailedException ex)
            {
                Console.WriteLine("Exception==>" + ex);
                ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png);
            }
        }
        public void SikuliSharpTest()
        {
            using (var loginPage = Sikuli.CreateSession())
            {
                //Patterns
                var nextButton    = Patterns.FromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"Images\nextButton.png"));
                var userNameInput = Patterns.FromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"Images\emailInput.png"));

                var userPassInput    = Patterns.FromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"Images\passwordInput.png"));
                var searchEmailInput = Patterns.FromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"Images\searchEmailInput.png"));

                //Waiting until the user name input is present
                loginPage.Wait(userNameInput);

                //Setting user name and password
                loginPage.Type("abarrazabriones");

                //Clicking on the Next button
                loginPage.Click(nextButton);

                //Waiting until the password input is present
                loginPage.Wait(userPassInput);

                //Setting user name and password
                loginPage.Type("cacuca13");

                //Clicking on the "Sign in" button
                loginPage.Click(nextButton);

                //Waiting until the search email input is present
                loginPage.Wait(searchEmailInput);
            }
        }
Example #3
0
        /// <summary>
        /// Key is use to virify the Visibility of an Image
        /// </summary>
        /// <param name="pageName"></param>
        /// <param name="locatorName"></param>
        /// <returns></returns>

        public static Boolean ImageVisible(string pageName, string locatorName)
        {
            Boolean status  = false;
            string  element = ElementLocator.GetElementforSikkli(pageName, locatorName);

            if (element != null)
            {
                using (var session = Sikuli.CreateSession())
                {
                    var clickme = Patterns.FromFile(element, 0.9f);
                    status = session.Exists(clickme, 60);
                    if (status == true)
                    {
                        log.Info(locatorName + " is present ");
                        session.Hover(clickme);
                    }
                    else
                    {
                        log.Info(locatorName + "  not found");
                        status = false;
                    }

                    session.Dispose();
                }
            }
            else
            {
                Report.Fail("Image of  " + locatorName + " is not Found");
                log.Error(TestContext.CurrentContext.Test.MethodName + " " + locatorName + " not found");
                status = false;
            }

            return(status);
        }
Example #4
0
        /// <summary>
        /// Keyword use to click on the Image
        /// </summary>
        /// <param name="pageName"></param>
        /// <param name="locatorName"></param>
        public static void Click(string pageName, string locatorName)
        {
            string element = ElementLocator.GetElementforSikkli(pageName, locatorName);

            if (element != null)
            {
                try
                {
                    using (var session = Sikuli.CreateSession())
                    {
                        var clickme = Patterns.FromFile(element, 0.9f);
                        session.Click(clickme);
                        session.Dispose();
                    }

                    //System.Console.WriteLine("launch started found...");
                    Report.Pass("Clicked On " + locatorName);
                    log.Info("Clicked On " + locatorName);
                }
                catch (FileNotFoundException fe)
                {
                    Report.Fail(fe.Message);
                    log.Error(TestContext.CurrentContext.Test.MethodName + " " + locatorName + " not found");
                }
            }
            else
            {
                Report.Fail(locatorName + " not found");
                log.Error(TestContext.CurrentContext.Test.MethodName + " " + locatorName + " not found");
            }
        }
        public void ThenUserVerifiesTheData()
        {
            try
            {
                SelectBrowser.driver.SwitchTo().Window(SelectBrowser.driver.WindowHandles.Last());
                using (var session = Sikuli.CreateSession())
                {
                    var down_text   = Patterns.FromFile(@"C:\Users\ankit.kansal\Desktop\Downloadbutton.PNG", 0.9f);
                    var save_button = Patterns.FromFile(@"C:\Users\ankit.kansal\Desktop\SaveButton.PNG", 0.9f);
                    session.Wait(down_text, 500);
                    session.Click(down_text);
                    test.Log(Status.Pass, "User Clicks on the Download Button");
                    session.Wait(save_button, 500);
                    session.Click(save_button);
                    test.Log(Status.Pass, "User Clicks on the Save Button");
                }

                Assert.IsTrue(PDFReaderP.ExtractPDF(@"C:\Users\ankit.kansal\Downloads\ReconReport_V9.pdf").Contains("Account"));
            }
            catch (AssertFailedException ex)
            {
                Console.WriteLine("Exception==>" + ex);
                ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png);
            }
        }
Example #6
0
        public void TestMethod1()
        {
            /*
             * Pattern file = new Pattern(@"C:\Users\Fabio\Desktop\jdownloaderImages\file.png");
             * Pattern max = new Pattern(@"C:\Users\Fabio\Desktop\jdownloaderImages\maximize.png");
             * Pattern aggiungi = new Pattern(@"C:\Users\Fabio\Desktop\jdownloaderImages\aggiungi.png");
             * Pattern testoAggiungi = new Pattern(@"C:\Users\Fabio\Desktop\jdownloaderImages\testoAggiungi.png");
             * Pattern continua = new Pattern(@"C:\Users\Fabio\Desktop\jdownloaderImages\continua.png");
             *
             *
             * TestStack.White.Application application = TestStack.White.Application.Launch(@"C:\Users\Fabio\AppData\Local\JDownloader v2.0\JDownloader2.exe");
             *
             * Thread.Sleep(5000);
             *
             * Sikuli4Net.sikuli_REST.Screen scr = new Sikuli4Net.sikuli_REST.Screen();
             * scr.Click(max);
             * scr.Click(file);
             * scr.Click(aggiungi);
             *
             * scr.Click(testoAggiungi);
             * SendKeys.SendWait("http://releases.ubuntu.com/19.04/ubuntu-19.04-desktop-amd64.iso");
             * Thread.Sleep(1000);
             * scr.Click(continua);
             *
             *
             * Thread.Sleep(4000);
             * application.Close();
             *
             */
            var file          = Patterns.FromFile(@"C:\Users\Fabio\Desktop\jdownloaderImages\file.png");
            var max           = Patterns.FromFile(@"C:\Users\Fabio\Desktop\jdownloaderImages\maximize.png", 0.8f);
            var aggiungi      = Patterns.FromFile(@"C:\Users\Fabio\Desktop\jdownloaderImages\aggiungi.png");
            var testoAggiungi = Patterns.FromFile(@"C:\Users\Fabio\Desktop\jdownloaderImages\testoAggiungi.png");
            var continua      = Patterns.FromFile(@"C:\Users\Fabio\Desktop\jdownloaderImages\continua.png");


            TestStack.White.Application application = TestStack.White.Application.Launch(@"C:\Users\Fabio\AppData\Local\JDownloader v2.0\JDownloader2.exe");

            Thread.Sleep(5000);

            using (var session = Sikuli.CreateSession())
            {
                try
                {
                    session.Click(max);
                }
                catch (SikuliFindFailedException e) { }
                session.Click(file);
                session.Click(aggiungi);

                session.Click(testoAggiungi);
                SendKeys.SendWait("http://releases.ubuntu.com/19.04/ubuntu-19.04-desktop-amd64.iso");
                Thread.Sleep(1000);
                session.Click(continua);
            }

            Thread.Sleep(4000);
            application.Close();
        }
Example #7
0
 public void CanRunSikuliProject()
 {
     using (ResourcesUtil.StartTestApplication())
     {
         Assert.That(
             Sikuli.RunProject(ResourcesUtil.DataFolder),
             Does.Contain("SikuliSharp.Tests.Success")
             );
     }
 }
Example #8
0
        public void CanRunSikuliCommands()
        {
            using (var session = Sikuli.CreateSession())
            {
                using (var app = ResourcesUtil.StartTestApplication())
                {
                    var redLabelPattern         = Patterns.FromFile(ResourcesUtil.RedLabelPatternPath, 0.9f);
                    var greenLabelPattern       = Patterns.FromFile(ResourcesUtil.GreenLabelPatternPath, 0.9f);
                    var testButtonPattern       = Patterns.FromFile(ResourcesUtil.TestButtonPatternPath, 0.9f);
                    var blackOffsetLabelPattern = Patterns.FromFile(ResourcesUtil.BlackOffsetLabelPatternPath, 0.9f);
                    var whiteOffsetLabelPattern = Patterns.FromFile(ResourcesUtil.WhiteOffsetLabelPatternPath, 0.9f);
                    var OffsetButtonPattern     = Patterns.FromFile(ResourcesUtil.OffsetButtonPatternPath, 0.9f);

                    Assert.That(session.Wait(redLabelPattern), Is.True, "Wait for application startup");

                    Assert.That(session.Exists(blackOffsetLabelPattern), Is.True, "Black offset label should exist");

                    Assert.That(session.Click(testButtonPattern, new Point(125, 0)), Is.True, "Click on the offset button by offsetting from the test button");

                    Assert.That(session.Exists(whiteOffsetLabelPattern), Is.True, "White offset label should exist");

                    var appLocation = app.GetWindowLocation();
                    Assert.That(session.Click(new Location(appLocation.X + 350, appLocation.Y + 100)), Is.True, "Click on offset button by location");

                    Assert.That(session.Exists(blackOffsetLabelPattern), Is.True, "Black offset label should exist");

                    session.Highlight(session.Find(blackOffsetLabelPattern), "blue");

                    session.Highlight(session.FindAll(OffsetButtonPattern)[0], "red");

                    Assert.That(session.Wait(redLabelPattern), Is.True, "Red label should exist");

                    Assert.That(session.Exists(greenLabelPattern), Is.False, "Green label should not exist yet");

                    Assert.That(session.Hover(testButtonPattern), Is.True, "Hover over Test Button");

                    Assert.That(session.Hover(new Location(appLocation.X + 350, appLocation.Y + 100)), Is.True, "Hover outside Test Button");

                    Assert.That(session.Click(testButtonPattern), Is.True, "Click on test button");

                    Assert.That(session.Exists(greenLabelPattern), Is.False, "Green label should still not exist (a 5s timer is shown)");

                    Assert.Throws <SikuliFindFailedException>(() => session.Wait(greenLabelPattern, 1), "Wait for green label, but not long enough should now work");

                    Assert.That(session.Wait(greenLabelPattern, 10), Is.True, "Wait for green label long enough should work");

                    Assert.That(session.Exists(greenLabelPattern, 10), Is.True, "Green label should now exist");

                    Assert.That(session.Type("x"), Is.True, "Type 'x' to exit");

                    Assert.That(session.WaitVanish(greenLabelPattern, 10), Is.True, "Wait for green label to vanish after app has exited");
                }
            }
        }
 public void ThenUserShouldBeAbleToVerifyPdfSuccesfully()
 {
     using (var session = Sikuli.CreateSession())
     {
         var Download_img = Patterns.FromFile(@"C:\Users\Anuruddha.Tiwari\Desktop\DownloadButton.PNG", 0.9f);
         var Save_img     = Patterns.FromFile(@"C:\Users\Anuruddha.Tiwari\Desktop\SaveButton.PNG", 0.9f);
         session.Wait(Download_img, 100);
         session.Click(Download_img);
         session.Wait(Save_img, 100);
         session.Click(Save_img);
     }
 }
Example #10
0
 public YoutubeEmbeddedPage(IWebDriver seleniumWebDriver) : base(seleniumWebDriver)
 {
     QualityAcceleratedLink = new Link(By.CssSelector("a[class='service_second_menu-list_link js-service_second_menu-list_link'][href='#header2']"), seleniumWebDriver);
     Screen                             = Sikuli.CreateSession();
     PlayButtonPattern                  = Patterns.FromFile(ImagePath + "\\Images\\play.png");
     PauseButtonPattern                 = Patterns.FromFile(ImagePath + "\\Images\\pause.png");
     MuteButtonPattern                  = Patterns.FromFile(ImagePath + "\\Images\\mute.png");
     UnmuteButtonPattern                = Patterns.FromFile(ImagePath + "\\Images\\unmute.png");
     SettingButtonPattern               = Patterns.FromFile(ImagePath + "\\Images\\setting.png");
     QualityButtonPattern               = Patterns.FromFile(ImagePath + "\\Images\\quality.png");
     FourEightZeroButtonPattern         = Patterns.FromFile(ImagePath + "\\Images\\480p.png");
     FourEightZeroSelectedButtonPattern = Patterns.FromFile(ImagePath + "\\Images\\480pselected.png");
 }
Example #11
0
        /// <summary>
        /// Method for Running Sikuli Script
        /// We can perform many operations like click,find ,rightClick,doubleclick etc etc using the Sikuli IDE by creating a script,
        /// those scripts we can call directly by using the below method and the Path to Script as parameter to this method.
        /// e.g "@C:\Users\Admin\Desktop\ScreenSki.sikuli"
        ///
        /// NOTE: Using Sikuli with Parallel testing and with Remote Driver is not reliable as when it interacts with Images,the Test case whose browser is
        /// running upfront(visible on the screen) will get passed but other test cases which is running in back (not running upfront) will get failed
        /// We can use Sikuli for running test case Sequentially using LocalWebDriver instance.
        ///
        /// Note:SikuliSharp wrapper is available for .net version 4.5 not for previous verison
        /// </summary>

        public void sikuliRunScript(String ScriptPath)
        {
            try
            {
                log.Info("Executing the Sikul Script with " + ScriptPath);
                Sikuli.RunProject(ScriptPath);
                log.Info("Successfully Executed Script :" + ScriptPath);
            }
            catch (Exception ex)
            {
                log.Error("Could not load the Sikuli script or SikuliScript.jar from Environment Path: " + ex.ToString());
            }
        }
        private void StartStopRecording()
        {
            //Inline sikuli function to press alt f9 for shadowplay
            using (var runtime = Sikuli.CreateRuntime())
            {
                runtime.Start();

                var result = runtime.Run(
                    @"print ""RESULT: OK"" if keyDown(Key.ALT + Key.F9) else ""RESULT: FAIL""",
                    "RESULT:",
                    0d
                    );
            }
        }
Example #13
0
 static void UseSikuli()
 {
     using (var session = Sikuli.CreateSession())
     {
         var    pattern = Patterns.FromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Capture.PNG"));
         bool   exists  = session.Exists(pattern);
         string result  = exists ? "Pattern exists" : "Pattern not found";
         Console.WriteLine(result);
         if (exists)
         {
             session.Hover(pattern);
         }
         Console.ReadKey();
     }
 }
Example #14
0
        /// <summary>
        /// Method for Verifying the existance of a pattern i.e image in the Page
        ///
        ///  NOTE: Using Sikuli with Parallel testing and with Remote Driver is not reliable as when it interacts with Images,the Test case whose browser is
        /// running upfront(visible on the screen) will get passed but other test cases which is running in back (not running upfront) will get failed
        /// We can use Sikuli for running test case Sequentially using LocalWebDriver instance
        /// </summary>
        /// <param name="Pattern">Here "Pattern" refers to a partial(Sub image)/full image of a web image/page which we need to validate
        /// e.g. We need to validate a part of google map,so we need to take a screenshot of that portion of the map and save it as a image
        /// with a name,and that saved image file's location along with the imagename is considered a "Pattern" i.e for an example @"C:\Users\Admin\Desktop\image.png"
        ///
        /// Note:SikuliSharp wrapper is available for .net version 4.5 not for previous verison
        /// </param>

        public void SikuliPatternVerifier(String Pattern)
        {
            try
            {
                using (var session = Sikuli.CreateSession())
                {
                    log.Info("The Path of the Pattern is: " + Pattern);
                    var pattern = Patterns.FromFile(Pattern);
                    MbUnit.Framework.Assert.IsTrue(session.Exists(pattern));
                    log.Info("The image/Pattern " + Pattern + " is verified successfully with Sikuli ");
                }
            }
            catch (Exception)
            {
                log.Error("Exception occured while creating Sikuli session");
            }
        }
 public void TestSikuliIntegration()
 {
     try
     {
         session  = Sikuli.CreateSession();
         patterns = Patterns.FromFile(@"C:\Data\win.PNG");
         if (session.Exists(patterns))
         {
             Console.WriteLine("Patteren Exist " + patterns.ToString());
             session.Wait(patterns, 60);
             session.Click(patterns);
         }
     }
     finally
     {
         session?.Dispose();
     }
 }
 public void WhenClickOnThePrintButton()
 {
     try
     {
         using (var session = Sikuli.CreateSession())
         {
             var print_text = Patterns.FromFile(@"C:\Users\ankit.kansal\Desktop\PrintImage.PNG", 0.9f);
             session.Wait(print_text, 500);
             session.Click(print_text);
             test.Log(Status.Pass, "User Clicks on the Print button");
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("Exception==>" + ex);
         ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png);
     }
 }
Example #17
0
 public void WriteInGoogleSearchBar(string searchTerm)
 {
     try
     {
         using (var session = Sikuli.CreateSession())
         {
             var input = Patterns.FromFile("C:\\Users\\juan_\\Documents\\projects\\dotnetBase\\GenericProject\\GenericProject\\Resources\\SikuliImages\\GoogleSearchInput.png", 0.9f);
             var logo  = Patterns.FromFile("C:\\Users\\juan_\\Documents\\projects\\dotnetBase\\GenericProject\\GenericProject\\Resources\\SikuliImages\\GoogleLogo.png", 0.9f);
             session.Click(input);
             session.Type(searchTerm);
             session.Click(logo);
         }
     }
     catch (Exception ex)
     {
         AssertionProvider.FailTest(ex.Message);
     }
 }
 //Method for running Sikuli scripts
 public static Boolean runSikuliScript(string scriptName)
 {
     try
     {
         //check if there is a Sikuli script with the given name in the assembly directory
         if (Boolean.Parse(Sikuli.RunProject(Path.GetDirectoryName(
                                                 Assembly.GetExecutingAssembly().Location) + "\\" + scriptName)))
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (FormatException fe)
     {
         Console.WriteLine("Error with Sikuli script: " + scriptName + " !");
         return(false);
     }
 }
Example #19
0
        public void CanRunSikuliCommands()
        {
            using (var session = Sikuli.CreateSession())
            {
                using (ResourcesUtil.StartTestApplication())
                {
                    var redLabelPattern         = Patterns.FromFile(ResourcesUtil.RedLabelPatternPath, 0.9f);
                    var greenLabelPattern       = Patterns.FromFile(ResourcesUtil.GreenLabelPatternPath, 0.9f);
                    var testButtonPattern       = Patterns.FromFile(ResourcesUtil.TestButtonPatternPath, 0.9f);
                    var blackOffsetLabelPattern = Patterns.FromFile(ResourcesUtil.BlackOffsetLabelPatternPath, 0.9f);
                    var whiteOffsetLabelPattern = Patterns.FromFile(ResourcesUtil.WhiteOffsetLabelPatternPath, 0.9f);

                    Assert.That(session.Wait(redLabelPattern), Is.True, "Wait for application startup");

                    Assert.That(session.Exists(blackOffsetLabelPattern), Is.True, "Black offset label should exist");

                    Assert.That(session.Click(testButtonPattern, new Point(125, 0)), Is.True, "Click on the offset button by offsetting from the test button");

                    Assert.That(session.Exists(whiteOffsetLabelPattern), Is.True, "White offset label should exist");

                    Assert.That(session.Wait(redLabelPattern), Is.True, "Red label should exist");

                    Assert.That(session.Exists(greenLabelPattern), Is.False, "Green label should not exist yet");

                    Assert.That(session.Click(testButtonPattern), Is.True, "Click on test button");

                    Assert.That(session.Exists(greenLabelPattern), Is.False, "Green label should still not exist (a 5s timer is shown)");

                    Assert.Throws <TimeoutException>(() => session.Wait(greenLabelPattern, 1), "Wait for green label, but not long enough should now work");

                    Assert.That(session.Wait(greenLabelPattern, 10), Is.True, "Wait for green label long enough should work");

                    Assert.That(session.Exists(greenLabelPattern), Is.True, "Green label should now exist");

                    Assert.That(session.Type("x"), Is.True, "Type 'x' to exit");

                    Assert.That(session.WaitVanish(greenLabelPattern, 10), Is.True, "Wait for green label to vanish after app has exited");
                }
            }
        }
Example #20
0
 public void Setup()
 {
     session = Sikuli.CreateSession();
     notepad = Process.Start("notepad.exe");
 }
Example #21
0
 public static void CreateSession()
 {
     Session = Sikuli.CreateSession();
 }
Example #22
0
 /// <summary>
 /// Initialzie the sessions for the Runner
 /// </summary>
 public static void InitializeSession()
 {
     _session           = Sikuli.CreateSession();
     SessionInitialized = true;
 }
        public void MakeReplays()
        {
            if (!IsBusy && Matches.Count > 0)
            {
                IsBusy = true;

                Task T = Task.Factory.StartNew(() =>
                {
                    CurrentMatch        = Matches.Dequeue();
                    CurrentMatch.Status = "Replay In Progress";
                    string imagePath    = HttpRuntime.AppDomainAppPath + "Images\\";
                    using (ISikuliSession session = Sikuli.CreateSession())
                    {
                        //session.Click(Patterns.FromFile(imagePath + "CloseButton.PNG"));
                        WaitAndClick(session, imagePath + "WatchButton.PNG");
                        WaitAndClick(session, imagePath + "WatchButton.PNG");
                        WaitAndClick(session, imagePath + "ReplaysButton.PNG");
                        WaitAndClick(session, imagePath + "MatchIds.PNG");
                        session.Type(CurrentMatch.MatchId);
                        WaitAndClick(session, imagePath + "SearchButton.PNG");
                        WaitAndClick(session, imagePath + "DownloadReplayButton.PNG");
                        WaitAndClick(session, imagePath + "MatchIdText.PNG");
                        WaitAndClick(session, imagePath + "WatchReplayButton.PNG", .9F);
                        StartStopRecording();

                        WaitAndClick(session, imagePath + "CollapseButton.PNG", .7f, 300);
                        //Wait 2 hours at most
                        //session.Wait(Patterns.FromFile(imagePath + "WatchReplayButton.PNG"), 7200);
                        try
                        {
                            session.Wait(Patterns.FromFile(imagePath + "WatchReplayButton.PNG"), 60);
                        }
                        catch { };
                        StartStopRecording();
                        //Wait 1 second for the sake of shadowplay's save
                        Thread.Sleep(1000);
                    }
                    //Cleanup Replay File
                    File.Delete(@"D:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\game\dota\replays\" + CurrentMatch.MatchId + ".DEM");
                    CurrentMatch.Done = true;
                    CurrentMatch.ProgressPercentage = 100;
                    LastCompletedMatch  = CurrentMatch;
                    CurrentMatch        = null;
                    IsBusy              = false;
                    CurrentMatch.Status = "Replay Uploading";
                    YoutubeUploader.UploadToYoutube();
                    MakeReplays();
                });
            }

            //Task to give a rough idea of replay progress
            Task progressUpdator = Task.Factory.StartNew(() =>
            {
                DateTime startTime = DateTime.Now;
                while (CurrentMatch != null && !CurrentMatch.Done)
                {
                    CurrentMatch.ProgressPercentage = DateTime.Now.Subtract(startTime).Seconds / int.Parse(CurrentMatch.Duration);
                    Thread.Sleep(2000);
                }
            });
        }
 public static ISikuliSession CreateSession()
 {
     Session = Sikuli.CreateSession();
     return(Session);
 }