예제 #1
0
 public Screenshotter(
     ScreenshotOptions options,
     IEnumerable <BrokenLink> brokenLinks,
     ProjectCredentials projectCredentials)
 {
     _options            = options ?? new ScreenshotOptions();
     brokenLinks         = brokenLinks ?? Enumerable.Empty <BrokenLink>();
     _brokenLinks        = brokenLinks.ToDictionary(x => x.Target, x => x);
     _projectCredentials = projectCredentials ?? new ProjectCredentials();
     _driver             = CreateDriver();
 }
예제 #2
0
        public ChromeAuthExtension(ProjectCredentials creds, string dir)
        {
            dir   = dir ?? "";
            creds = creds ?? new ProjectCredentials();

            _creds = creds;
            _dir   = dir;
            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }
            else if (Directory.GetFiles(dir).Any())
            {
                throw new Exception("The extension directory must be empty.");
            }
        }