Esempio n. 1
0
        public void TestParseScriptResult()
        {
            Logger logger = InitLogging(out string path);

            IDictionary <Uri, ResourceFuture>         cache    = new ConcurrentDictionary <Uri, ResourceFuture>();
            ConcurrentDictionary <Uri, RGridResource> allBlobs = new ConcurrentDictionary <Uri, RGridResource>();
            HashSet <Uri> resourceUrls = new HashSet <Uri>();

            FileDebugResourceWriter debugResourceWriter = new FileDebugResourceWriter(path);
            RenderingTask           renderingTask       = new RenderingTask(logger, null, cache, null, null, debugResourceWriter);

            VisualGridEyes eyes = new VisualGridEyes(new ConfigurationProviderForTesting());

            eyes.SetLogHandler(logger.GetILogHandler());

            IWebDriver webDriver = SeleniumUtils.CreateChromeDriver();

            webDriver.Url = "http://applitools.github.io/demo/TestPages/FramesTestPage/";
            eyes.InitDriver(webDriver);
            try
            {
                string    scriptResult = eyes.GetDomCaptureAndPollingScriptResult_();
                FrameData frameData    = JsonConvert.DeserializeObject <FrameData>(scriptResult);
                renderingTask.ParseScriptResult_(frameData, allBlobs, resourceUrls);
            }
            finally
            {
                webDriver.Quit();
            }
        }
Esempio n. 2
0
        public void TestNoMissingSteps_UT()
        {
            logger_.SetLogHandler(TestUtils.InitLogHandler());

            Configuration config = new Configuration();

            config.SetTestName(nameof(TestNoMissingSteps_UT));

            List <RunningTest> tests = new List <RunningTest>();

            CreateTest_("test1").AddTask(TaskType.Open).AddTo(tests);
            CreateTest_("test2").SetOpenTaskIssued().AddTo(tests);
            CreateTest_("test3").SetCloseTaskIssued().AddTo(tests);
            CreateTest_("test4").AddTask(TaskType.Open).AddTask(TaskType.Check).AddTo(tests);
            CreateTest_("test5").AddTask(TaskType.Open).AddTask(TaskType.Check).AddTask(TaskType.Close).AddTo(tests);
            CreateTest_("test6").AddTask(TaskType.Open).AddTask(TaskType.Abort).AddTo(tests);
            CreateTest_("test7").SetOpenTaskIssued().SetCloseTaskIssued().AddTo(tests);
            CreateTest_("test8").AddTo(tests);
            CreateTest_("test9").SetOpenTaskIssued().AddTask(TaskType.Check).AddTo(tests);

            List <RunningTest> filteredList = VisualGridEyes.CollectTestsForCheck_(logger_, tests);

            Assert.AreEqual(4, filteredList.Count);
            Assert.AreEqual("test1", filteredList[0].TestName);
            Assert.AreEqual("test2", filteredList[1].TestName);
            Assert.AreEqual("test4", filteredList[2].TestName);
            Assert.AreEqual("test9", filteredList[3].TestName);
        }
        public void TestResetContent()
        {
            Configuration config = new Configuration();

            config.AddBrowser(new IosDeviceInfo(IosDeviceName.iPhone_7));
            ConfigurationProvider configurationProvider = new ConfigurationProvider(config);
            VisualGridRunner      runner = new VisualGridRunner(new RunnerOptions().TestConcurrency(3));
            VisualGridEyes        eyes   = new VisualGridEyes(configurationProvider, runner);

            eyes.SetLogHandler(TestUtils.InitLogHandler());

            IWebDriver driver = SeleniumUtils.CreateChromeDriver();

            driver.Url = "http://applitools.github.io/demo";
            try
            {
                eyes.Open(driver, "Eyes SDK", "UFG Runner Concurrency", new Size(800, 800));
                eyes.Check(Target.Window().Fully());
                eyes.CloseAsync(true);
            }
            finally
            {
                eyes.AbortAsync();
                driver.Quit();
                runner.GetAllTestResults(false);
            }

            foreach (ResourceFuture resourceFuture in ((IVisualGridRunner)runner).CachedResources.Values)
            {
                RGridResource resource = resourceFuture.GetResource();
                Assert.IsNotNull(resource);
                Assert.IsNull(resource.Content);
            }
        }
        public void TestParallelStepsLimitOfTest()
        {
            bool isOnlyOneRender     = true;
            int  runningRendersCount = 0;

            VisualGridRunner runner = new VisualGridRunner();
            Configuration    config = new Configuration();

            config.AddBrowser(new IosDeviceInfo(IosDeviceName.iPhone_7));
            ConfigurationProvider configurationProvider = new ConfigurationProvider(config);

            VisualGridEyes eyes = new VisualGridEyes(configurationProvider, runner);

            eyes.SetLogHandler(TestUtils.InitLogHandler());
            eyes.EyesConnectorFactory = new MockEyesConnectorFactory();

            IWebDriver driver = SeleniumUtils.CreateChromeDriver();

            try
            {
                driver.Url = "http://applitools.github.io/demo";
                eyes.Open(driver, "Eyes SDK", "UFG Server Concurrency", new RectangleSize(800, 800));
                MockEyesConnector mockEyesConnector = (MockEyesConnector)eyes.eyesConnector_;

                mockEyesConnector.BeforeRender += (renderRequests) =>
                {
                    int runningRendersCountBeforeInc = runningRendersCount;
                    Interlocked.Increment(ref runningRendersCount);
                    if (runningRendersCountBeforeInc >= RunningTest.PARALLEL_STEPS_LIMIT)
                    {
                        isOnlyOneRender = false;
                    }

                    Thread.Sleep(1000);
                    if (renderRequests.Length != 1)
                    {
                        isOnlyOneRender = false;
                    }
                };

                mockEyesConnector.AfterRender += (results, renderRequests) =>
                {
                    Interlocked.Decrement(ref runningRendersCount);
                };

                for (int i = 0; i < 10; i++)
                {
                    eyes.Check(Target.Window().Fully());
                }
                eyes.CloseAsync(false);
            }
            finally
            {
                eyes.AbortAsync();
                driver.Quit();
                runner.GetAllTestResults(false);
            }

            Assert.IsTrue(isOnlyOneRender);
        }
        public void TestRetryWhenServerConcurrencyLimitReached()
        {
            Configuration config = new Configuration();

            config.AddBrowser(new IosDeviceInfo(IosDeviceName.iPhone_7));

            ConfigurationProvider configurationProvider = new ConfigurationProvider(config);
            VisualGridRunner      runner = new VisualGridRunner(new RunnerOptions().TestConcurrency(3));
            VisualGridEyes        eyes   = new VisualGridEyes(configurationProvider, runner);

            eyes.SetLogHandler(TestUtils.InitLogHandler());

            int  counter            = 0;
            bool wasConcurrencyFull = false;

            eyes.EyesConnectorFactory = new MockEyesConnectorFactory()
            {
                Events = new Events()
                {
                    BeforeStartSession = () =>
                    {
                        if (Interlocked.Increment(ref counter) < 4)
                        {
                            RunningSession newSession = new RunningSession();
                            newSession.ConcurrencyFull = true;
                            return(newSession);
                        }
                        return(null);
                    }
                }
            };

            eyes.AfterServerConcurrencyLimitReachedQueried += (concurrecnyReached) =>
            {
                if (concurrecnyReached)
                {
                    wasConcurrencyFull = true;
                }
            };

            IWebDriver driver = SeleniumUtils.CreateChromeDriver();

            driver.Url = "http://applitools.github.io/demo";
            try
            {
                eyes.Open(driver, "Eyes SDK", "UFG Runner Concurrency", new Size(800, 800));
                eyes.Check(Target.Window().Fully());
                eyes.CloseAsync(true);
            }
            finally
            {
                eyes.AbortAsync();
                driver.Quit();
                runner.GetAllTestResults(false);
            }

            Assert.IsTrue(wasConcurrencyFull);
            Assert.IsFalse(((IVisualGridEyes)eyes).IsServerConcurrencyLimitReached());
            Assert.AreEqual(4, counter);
        }
        public void TestCreateDomSnapshotCollectsCookiesWhenDisabledUsingFluentApi()
        {
            IWebDriver driver = SeleniumUtils.CreateChromeDriver();

            driver.Url = "http://applitools.github.io/demo/TestPages/CookiesTestPage/";
            Eyes             eyes   = Setup(driver);
            VisualGridRunner runner = (VisualGridRunner)eyes.runner_;

            try
            {
                Configuration config = eyes.GetConfiguration();
                config
                .SetAppName("test app").SetTestName("test name")
                .SetBatch(TestDataProvider.BatchInfo);
                eyes.SetConfiguration(config);
                EyesWebDriver eyesDriver            = (EyesWebDriver)eyes.Open(driver);
                EyesWebDriverTargetLocator switchTo = (EyesWebDriverTargetLocator)eyesDriver.SwitchTo();
                UserAgent userAgent    = UserAgent.ParseUserAgentString(eyesDriver.GetUserAgent());
                FrameData scriptResult = VisualGridEyes.CaptureDomSnapshot_(
                    switchTo, userAgent, config, Target.Window().UseCookies(false), runner, eyesDriver, runner.Logger);

                Assert.IsNull(scriptResult.Cookies);
                Assert.IsNull(scriptResult.Frames[0].Cookies);
                Assert.IsNull(scriptResult.Frames[0].Frames[0].Cookies);
            }
            finally
            {
                driver.Quit();
                eyes.AbortIfNotClosed();
                runner.StopServiceRunner();
            }
        }
Esempio n. 7
0
 public Eyes(EyesRunner runner)
 {
     if (runner == null)
     {
         runner = new ClassicRunner();
     }
     runner_ = runner;
     if (runner is VisualGridRunner visualGridRunner)
     {
         visualGridEyes_   = new VisualGridEyes(this, visualGridRunner);
         isVisualGridEyes_ = true;
         activeEyes_       = visualGridEyes_;
     }
     else
     {
         seleniumEyes_ = new SeleniumEyes(this, (ClassicRunner)runner);
         activeEyes_   = seleniumEyes_;
     }
     configuration_.SetForceFullPageScreenshot(isVisualGridEyes_);
 }
Esempio n. 8
0
 public Eyes(EyesRunner runner)
 {
     if (runner == null)
     {
         runner = new ClassicRunner();
     }
     runner_ = runner;
     if (runner is VisualGridRunner visualGridRunner)
     {
         visualGridEyes_   = new VisualGridEyes(this, visualGridRunner);
         isVisualGridEyes_ = true;
         activeEyes_       = visualGridEyes_;
     }
     else
     {
         seleniumEyes_ = new SeleniumEyes(this, (ClassicRunner)runner);
         activeEyes_   = seleniumEyes_;
     }
     ServerConnector = runner.ServerConnector;
 }
Esempio n. 9
0
        public void TestPrepareDataForRG()
        {
            Logger logger = InitLogging(out string path);

            FileDebugResourceWriter debugResourceWriter = new FileDebugResourceWriter(path);

            VisualGridEyes eyes = new VisualGridEyes(new ConfigurationProviderForTesting());

            eyes.SetLogHandler(logger.GetILogHandler());
            IDictionary <Uri, ResourceFuture> cache = new ConcurrentDictionary <Uri, ResourceFuture>();

            RenderBrowserInfo     renderBrowserInfo = new RenderBrowserInfo(400, 300, BrowserType.CHROME, "linux");
            List <VisualGridTask> taskList          = new List <VisualGridTask>()
            {
                new VisualGridTask(TaskType.Check, logger, new RunningTest(renderBrowserInfo, logger))
            };
            RenderingInfo renderingInfo = new RenderingInfo()
            {
                AccessToken = "TestToken", ResultsUrl = new Uri("localhost:12345"), ServiceUrl = new Uri("localhost:54321")
            };
            RenderingTask renderingTask = new RenderingTask(logger, new CheckSettings(), cache, taskList, renderingInfo, debugResourceWriter);

            IWebDriver webDriver = SeleniumUtils.CreateChromeDriver();

            webDriver.Url = "http://applitools.github.io/demo/TestPages/FramesTestPage/";
            eyes.InitDriver(webDriver);
            try
            {
                string          scriptResult   = eyes.GetDomCaptureScriptResult_();
                FrameData       frameData      = JsonConvert.DeserializeObject <FrameData>(scriptResult);
                RenderRequest[] renderRequests = renderingTask.PrepareDataForRG_(frameData);
                webDriver.Close();
            }
            finally
            {
                webDriver.Quit();
            }
        }
Esempio n. 10
0
        public void TestMapRunningTestsToRequiredBrowserWidth()
        {
            WebDriverProvider       webdriverProvider      = new WebDriverProvider();
            IServerConnectorFactory serverConnectorFactory = new MockServerConnectorFactory(webdriverProvider);
            ILogHandler             logHandler             = TestUtils.InitLogHandler();
            VisualGridRunner        runner = new VisualGridRunner(30, nameof(TestMapRunningTestsToRequiredBrowserWidth),
                                                                  serverConnectorFactory, logHandler);

            Eyes wrappingEyes = new Eyes(runner);

            Configuration configuration = wrappingEyes.GetConfiguration();

            configuration.AddBrowser(new DesktopBrowserInfo(1000, 500, BrowserType.CHROME));
            configuration.AddBrowser(new DesktopBrowserInfo(1000, 700, BrowserType.CHROME));
            configuration.AddBrowser(new DesktopBrowserInfo(700, 500, BrowserType.CHROME));
            wrappingEyes.SetConfiguration(configuration);

            VisualGridEyes eyes = wrappingEyes.visualGridEyes_;

            //doNothing().when(eyes).setViewportSize(ArgumentMatchers.< EyesSeleniumDriver > any());
            //eyes.ServerConnector(new MockServerConnector());

            //RemoteWebDriver driver = mock(RemoteWebDriver.class);
            //when(driver.getSessionId()).thenReturn(mock(SessionId.class));
            ChromeDriver driver = SeleniumUtils.CreateChromeDriver();

            webdriverProvider.SetDriver(driver);
            try
            {
                driver.Url = "data:text/html,<html><body><h1>Hello, world!</h1></body></html>";
                eyes.Open(driver, "app", "test", new Size(800, 800));

                Fluent.SeleniumCheckSettings          seleniumCheckSettings = Target.Window();
                Dictionary <int, List <RunningTest> > map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.IsEmpty(map);

                seleniumCheckSettings = Target.Window().LayoutBreakpointsEnabled(false);
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.IsEmpty(map);

                seleniumCheckSettings = Target.Window().LayoutBreakpointsEnabled(true);
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.AreEquivalent(new int[] { 700, 1000 }, map.Keys);
                Assert.AreEqual(1, map[700].Count);
                Assert.AreEqual(2, map[1000].Count);

                seleniumCheckSettings = Target.Window().LayoutBreakpoints(750, 1200);
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.AreEquivalent(new int[] { 749, 750 }, map.Keys);
                Assert.AreEqual(1, map[749].Count);
                Assert.AreEqual(2, map[750].Count);

                seleniumCheckSettings = Target.Window().LayoutBreakpoints(700);
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.AreEquivalent(new int[] { 700 }, map.Keys);
                Assert.AreEqual(3, map[700].Count);

                wrappingEyes.SetConfiguration(configuration.SetLayoutBreakpointsEnabled(false));
                seleniumCheckSettings = Target.Window();
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.IsEmpty(map);

                wrappingEyes.SetConfiguration(configuration.SetLayoutBreakpointsEnabled(true));
                seleniumCheckSettings = Target.Window();
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.AreEquivalent(new int[] { 700, 1000 }, map.Keys);
                Assert.AreEqual(1, map[700].Count);
                Assert.AreEqual(2, map[1000].Count);

                wrappingEyes.SetConfiguration(configuration.SetLayoutBreakpoints(750, 1200));
                seleniumCheckSettings = Target.Window();
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.AreEquivalent(new int[] { 749, 750 }, map.Keys);
                Assert.AreEqual(1, map[749].Count);
                Assert.AreEqual(2, map[750].Count);

                wrappingEyes.SetConfiguration(configuration.SetLayoutBreakpoints(750, 1200));
                seleniumCheckSettings = Target.Window().LayoutBreakpointsEnabled(true);
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.AreEquivalent(new int[] { 700, 1000 }, map.Keys);
                Assert.AreEqual(1, map[700].Count);
                Assert.AreEqual(2, map[1000].Count);

                wrappingEyes.SetConfiguration(configuration.SetLayoutBreakpoints(750, 1200));
                seleniumCheckSettings = Target.Window().LayoutBreakpoints(700);
                map = eyes.MapRunningTestsToRequiredBrowserWidth_(seleniumCheckSettings);
                CollectionAssert.AreEquivalent(new int[] { 700 }, map.Keys);
                Assert.AreEqual(3, map[700].Count);
            }
            finally
            {
                driver.Quit();
                runner.StopServiceRunner();
            }
        }
        public void TestRunnerConcurrency()
        {
            Configuration config = new Configuration();

            config.AddBrowser(new IosDeviceInfo(IosDeviceName.iPhone_7));
            config.AddDeviceEmulation(DeviceName.Galaxy_S5, ScreenOrientation.Landscape);
            config.AddBrowser(new DesktopBrowserInfo(800, 800, BrowserType.CHROME));
            config.AddBrowser(new DesktopBrowserInfo(800, 800, BrowserType.FIREFOX));
            config.AddBrowser(new DesktopBrowserInfo(800, 800, BrowserType.SAFARI));

            ConfigurationProvider configurationProvider = new ConfigurationProvider(config);
            VisualGridRunner      runner = new VisualGridRunner(new RunnerOptions().TestConcurrency(3));
            VisualGridEyes        eyes   = new VisualGridEyes(configurationProvider, runner);

            eyes.SetLogHandler(TestUtils.InitLogHandler());

            int  currentlyOpenTests = 0;
            bool isFail             = false;

            eyes.EyesConnectorFactory = new MockEyesConnectorFactory()
            {
                Events = new Events()
                {
                    BeforeStartSession = () =>
                    {
                        if (Interlocked.Increment(ref currentlyOpenTests) > 3)
                        {
                            isFail = true;
                        }
                        Thread.Sleep(3000);
                        if (currentlyOpenTests > 3)
                        {
                            isFail = true;
                        }
                        return(null);
                    },
                    AfterEndSession = () =>
                    {
                        Interlocked.Decrement(ref currentlyOpenTests);
                    }
                }
            };

            IWebDriver driver = SeleniumUtils.CreateChromeDriver();

            driver.Url = "http://applitools.github.io/demo";
            try
            {
                eyes.Open(driver, "Eyes SDK", "UFG Runner Concurrency", new Size(800, 800));
                eyes.Check(Target.Window().Fully());
                eyes.CloseAsync(true);
            }
            finally
            {
                eyes.AbortAsync();
                driver.Quit();
                runner.GetAllTestResults(false);
            }

            Assert.IsFalse(isFail, "Number of open tests was higher than the concurrency limit");
        }
        public void TestCreateDomSnapshotCollectsCookiesWhenNotHandlingCorsFrames()
        {
            IWebDriver driver = SeleniumUtils.CreateChromeDriver();

            driver.Url = "http://applitools.github.io/demo/TestPages/CookiesTestPage/";
            Eyes             eyes   = Setup(driver);
            VisualGridRunner runner = (VisualGridRunner)eyes.runner_;

            try
            {
                Configuration config = eyes.GetConfiguration();
                config
                .SetAppName("test app").SetTestName("test name")
                .SetBatch(TestDataProvider.BatchInfo)
                .SetUseCookies(true);
                eyes.SetConfiguration(config);
                EyesWebDriver eyesDriver            = (EyesWebDriver)eyes.Open(driver);
                EyesWebDriverTargetLocator switchTo = (EyesWebDriverTargetLocator)eyesDriver.SwitchTo();
                UserAgent userAgent    = UserAgent.ParseUserAgentString(eyesDriver.GetUserAgent());
                FrameData scriptResult = VisualGridEyes.CaptureDomSnapshot_(
                    switchTo, userAgent, config, Target.Window(), runner, eyesDriver, runner.Logger);

                CollectionAssert.AreEquivalent(new Cookie[] {
                    new Cookie("frame1", "1", "/demo/TestPages/CookiesTestPage", "applitools.github.io")
                    {
                        HttpOnly = false,
                        Secure   = false
                    },
                    new Cookie("index", "1", "/demo/TestPages/CookiesTestPage", "applitools.github.io")
                    {
                        HttpOnly = false,
                        Secure   = false
                    }
                },
                                               scriptResult.Cookies);


                CollectionAssert.AreEquivalent(new Cookie[] {
                    new Cookie("frame1", "1", "/demo/TestPages/CookiesTestPage", "applitools.github.io")
                    {
                        HttpOnly = false,
                        Secure   = false
                    },
                    new Cookie("index", "1", "/demo/TestPages/CookiesTestPage", "applitools.github.io")
                    {
                        HttpOnly = false,
                        Secure   = false
                    }
                },
                                               scriptResult.Frames[0].Cookies);

                CollectionAssert.AreEquivalent(new Cookie[] {
                    new Cookie("frame1", "1", "/demo/TestPages/CookiesTestPage", "applitools.github.io")
                    {
                        HttpOnly = false,
                        Secure   = false
                    },
                    new Cookie("index", "1", "/demo/TestPages/CookiesTestPage", "applitools.github.io")
                    {
                        HttpOnly = false,
                        Secure   = false
                    },
                    new Cookie("frame2", "1", "/demo/TestPages/CookiesTestPage/subdir", "applitools.github.io")
                    {
                        HttpOnly = false,
                        Secure   = false
                    }
                },
                                               scriptResult.Frames[0].Frames[0].Cookies);
            }
            finally
            {
                driver.Quit();
                eyes.AbortIfNotClosed();
                runner.StopServiceRunner();
            }
        }
        //[Test]
        public void TestVisualGridSkipList()
        {
            VisualGridRunner runner = new VisualGridRunner(10);
            Eyes             eyes   = new Eyes(runner);

            TestUtils.SetupLogging(eyes);
            //eyes.visualGridEyes_.EyesConnectorFactory = new MockEyesConnectorFactory();

            Configuration config = eyes.GetConfiguration();

            config.AddBrowser(1050, 600, BrowserType.CHROME);
            config.SetBatch(TestDataProvider.BatchInfo);
            eyes.SetConfiguration(config);

            AutoResetEvent waitHandle = new AutoResetEvent(false);

            runner.debugLock_ = waitHandle;

            IWebDriver driver = SeleniumUtils.CreateChromeDriver();

            //driver.Url = "https://applitools.github.io/demo/DomSnapshot/test-iframe.html";
            driver.Url = "https://applitools.github.io/demo/TestPages/VisualGridTestPage/";
            try
            {
                MockEyesConnector mockEyesConnector = OpenEyesAndGetConnector_(eyes, config, driver, out IWebDriver eyesDriver);

                eyes.Check(Target.Window());
                string[] expectedUrls = new string[] {
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/AbrilFatface-Regular.woff2",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/applitools_logo_combined.svg",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/company_name.png",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/frame.html",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/innerstyle0.css",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/innerstyle1.css",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/innerstyle2.css",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/logo.svg",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/minions-800x500_green_sideways.png",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/minions-800x500.jpg",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/slogan.svg",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/style0.css",
                    "https://applitools.github.io/demo/TestPages/VisualGridTestPage/style1.css",
                    "https://fonts.googleapis.com/css?family=Raleway",
                    "https://fonts.googleapis.com/css?family=Unlock",
                    "https://fonts.gstatic.com/s/raleway/v18/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCFPrEHJA.woff2",
                    "https://fonts.gstatic.com/s/raleway/v18/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2",
                    "https://fonts.gstatic.com/s/raleway/v18/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCHPrEHJA.woff2",
                    "https://fonts.gstatic.com/s/raleway/v18/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2",
                    "https://fonts.gstatic.com/s/raleway/v18/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCMPrEHJA.woff2",
                    "https://fonts.gstatic.com/s/unlock/v10/7Au-p_8ykD-cDl72LwLT.woff2",
                    "https://use.fontawesome.com/releases/v5.8.2/css/all.css",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-brands-400.eot",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-brands-400.svg",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-brands-400.ttf",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-brands-400.woff",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-brands-400.woff2",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-regular-400.eot",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-regular-400.svg",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-regular-400.ttf",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-regular-400.woff",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-regular-400.woff2",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-solid-900.eot",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-solid-900.svg",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-solid-900.ttf",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-solid-900.woff",
                    "https://use.fontawesome.com/releases/v5.8.2/webfonts/fa-solid-900.woff2"
                };

                waitHandle.WaitOne(TimeSpan.FromSeconds(5));

                CollectionAssert.AreEquivalent(expectedUrls, ((IVisualGridRunner)runner).CachedBlobsURLs.Keys);

                UserAgent userAgent = eyes.visualGridEyes_.userAgent_;
                EyesWebDriverTargetLocator switchTo = (EyesWebDriverTargetLocator)eyesDriver.SwitchTo();

                FrameData domData = VisualGridEyes.CaptureDomSnapshot_(
                    switchTo, userAgent, config,
                    runner, (EyesWebDriver)eyesDriver, eyes.Logger);

                //DomAnalyzer domAnalyzer = new DomAnalyzer(runner,
                //    domData,
                //    eyes.visualGridEyes_.eyesConnector_,
                //    userAgent,
                //    eyes.visualGridEyes_.debugResourceWriter_);
                //IDictionary<string, RGridResource> resourceMap = domAnalyzer.Analyze();
                //CollectionAssert.AreEquivalent(expectedUrls, resourceMap.Keys);
                //eyes.Check(Target.Window());
                eyes.Close();

                runner.GetAllTestResults();
            }
            finally
            {
                eyes.AbortIfNotClosed();
                driver.Close();
            }
        }