private void RunUITest(Action <IWebDriver, Uri, int> uitest, UITestOptions options = null) { options = options ?? new UITestOptions(); RunE2ETest((context) => { ChromeOptions chromeOptions = new ChromeOptions(); if (!Debugger.IsAttached) { chromeOptions.AddArgument("--headless"); } using (ChromeDriver browser = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), chromeOptions)) { try { uitest(browser, context.BaseUrl, context.SmtpPortNumber); } finally { browser.Quit(); } } }, options ); }
private void RunUITest(Action <IWebDriver, Uri, int> uitest, UITestOptions options = null) { options ??= new UITestOptions(); RunE2ETest(context => { ChromeOptions chromeOptions = new ChromeOptions(); if (!Debugger.IsAttached) { chromeOptions.AddArgument("--headless"); } using var browser = new ChromeDriver(chromeOptions); try { uitest(browser, context.BaseUrl, context.SmtpPortNumber); } finally { browser.Quit(); } }, options ); }