private CompareResult RunTest(ArgsProcessor argProc, CompareResult overallResult, ReportSet reportSet, TestDescription test) { _driver.SetWindowSize(test.WindowSize); _driver.OpenUrl(test.Url, test.DivSelector, test.TitleContains); var dirManager = new DirectoryManager(argProc); if (argProc.IsOptionOn(ArgsProcessor.Options.Run)) { var reportThisTest = CompareActualPageVersusExpected(argProc, dirManager, test, _driver); var resultThisTest = reportThisTest.Result.Result; if (resultThisTest != CompareResult.Similar) { overallResult = resultThisTest; } reportSet.Reports.Add(reportThisTest); } else if (argProc.IsOptionOn(ArgsProcessor.Options.Save)) { SaveExpectedPage(dirManager, test, _driver); } else { throw new InvalidOperationException("Not a supported set of options"); } return(overallResult); }