Inheritance: IService
        public void ExampleComparison()
        {
            Console.WriteLine("Example Comparison");

            var qb = new QualityBot.Service();
            var comparisons = qb.Compare("http://www.ancestry.com", "http://www.ancestrystage.com");

            Console.WriteLine("Done");

            var comparison = comparisons.SingleOrDefault();
            Console.WriteLine("comparison ID: " + comparison.Id);

            Console.WriteLine("HTML diff: " + comparison.Result.Html.PercentChanged);
            Console.WriteLine("Pixel diff: " + comparison.Result.Pixels.PercentChanged);

            var scrape = comparison.Scrapes.First();
            Console.WriteLine("First scrape");
            Console.WriteLine("Id: " + scrape.IdString);
            Console.WriteLine("Url: " + scrape.Url);
            Console.WriteLine("Browser: " + scrape.Browser + " " + scrape.BrowserVersion);
            Console.WriteLine("OS: " + scrape.Platform);
            Console.WriteLine("timestamp: " + scrape.TimeStamp);

            var html = scrape.Html.Value;
            var screenshot = scrape.Screenshot;
        }
Beispiel #2
0
        public static void CompareStageAndProduction()
        {
            var qb = new QualityBot.Service();
            var comparisons = qb.Compare("http://www.ancestry.com", "http://www.ancestrystage.com");
            var comparison = comparisons.Single();

            DisplayComparisonInfo(comparison);
        }
Beispiel #3
0
        public static void CompareFirefoxAndChrome()
        {
            var firefox = new Request("http://www.ancestrystage.com", Browsers.Firefox, "10.0");
            var chrome = new Request("http://www.ancestrystage.com", Browsers.Chrome);

            var qb = new QualityBot.Service();
            var comparisons = qb.CompareDynamic(firefox, chrome);
            var comparison = comparisons.Single();

            DisplayComparisonInfo(comparison);
        }
Beispiel #4
0
        public static void ComparePageOverTime()
        {
            var qb = new QualityBot.Service();

            var request = new Request("http://www.ancestrystage.com");
            request.Browser = Browsers.IE;
            request.BrowserVersion = "9";

            var scrapeId1 = qb.ScrapeDynamic(request);
            Console.WriteLine("scrape ID: {0}", scrapeId1);

            Thread.Sleep(10000);

            var scrapeId2 = qb.ScrapeDynamic(request);
            Console.WriteLine("scrape ID: {0}", scrapeId2);

            var comparisons = qb.CompareScrapeIds(scrapeId1, scrapeId2, true);
            var comparison = comparisons.First();
            DisplayComparisonInfo(comparison);
        }