diff --git a/Lombiq.Tests.UI/Services/WebDriverFactory.cs b/Lombiq.Tests.UI/Services/WebDriverFactory.cs index 7a5105f69..db376e545 100644 --- a/Lombiq.Tests.UI/Services/WebDriverFactory.cs +++ b/Lombiq.Tests.UI/Services/WebDriverFactory.cs @@ -25,9 +25,6 @@ public static Task> CreateChromeDriverAsync(BrowserConfigurat Task> CreateDriverInnerAsync(string driverPath = null) => Task.FromResult(() => { - // Note that no-sandbox should NOT be used, because it causes Chrome processes to remain open, see - // https://github.com/Lombiq/UI-Testing-Toolbox/issues/356. - var chromeConfig = new ChromeConfiguration { Options = new ChromeOptions().SetCommonOptions() }; chromeConfig.Options.SetLoggingPreference(LogType.Browser, LogLevel.Info); @@ -144,7 +141,6 @@ private static TDriverOptions SetCommonChromiumOptions( BrowserConfiguration configuration) where TDriverOptions : ChromiumOptions { - options.AddArgument("--no-sandbox"); // #spell-check-ignore-line options.AddArgument("--lang=" + configuration.AcceptLanguage); // Disabling hardware acceleration to avoid hardware dependent issues in rendering and visual validation. @@ -161,6 +157,12 @@ private static TDriverOptions SetCommonChromiumOptions( // Disabling smooth scrolling to avoid large waiting time when taking full-page screenshots. options.AddArgument("disable-smooth-scrolling"); + // Previously this switch caused Chrome processes to remain open after test execution, see + // https://github.com/Lombiq/UI-Testing-Toolbox/issues/356, but it doesn't seem to be case anymore. + // Additionally, Ubuntu 2024-based GitHub Actions runners seem to require this flag to be set, see + // https://github.com/actions/runner-images/issues/8268#issuecomment-2343831000. + options.AddArgument("--no-sandbox"); + if (configuration.FakeVideoSource is not null) { var fakeCameraSourceFilePath = configuration.FakeVideoSource.SaveVideoToTempFolder();