diff --git a/.github/workflows/dotnetCi.yml b/.github/workflows/dotnetCi.yml
index f44f8d96..cfeb6f5a 100644
--- a/.github/workflows/dotnetCi.yml
+++ b/.github/workflows/dotnetCi.yml
@@ -41,7 +41,7 @@ jobs:
PullRequestParam: ${{ github.event_name == 'pull_request' && format('/d:sonar.pullrequest.key={0}', github.event.number) || '' }}
DISPLAY: :99
# Change selected factory to VerboseChrome to debug Chrome-related issues
- WebDriverFactory__SelectedConfiguration: DefaultChrome
+ WebDriverFactory__SelectedConfiguration: CiHeadlessChrome
steps:
- name: Checkout
diff --git a/CSF.Screenplay.Selenium/CSF.Screenplay.Selenium.csproj b/CSF.Screenplay.Selenium/CSF.Screenplay.Selenium.csproj
index 501569e8..b854109e 100644
--- a/CSF.Screenplay.Selenium/CSF.Screenplay.Selenium.csproj
+++ b/CSF.Screenplay.Selenium/CSF.Screenplay.Selenium.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/Tests/CSF.Screenplay.Selenium.Tests/CiChromeOptionsCustomizer.cs b/Tests/CSF.Screenplay.Selenium.Tests/CiChromeOptionsCustomizer.cs
new file mode 100644
index 00000000..46f1694f
--- /dev/null
+++ b/Tests/CSF.Screenplay.Selenium.Tests/CiChromeOptionsCustomizer.cs
@@ -0,0 +1,12 @@
+using CSF.Extensions.WebDriver.Factories;
+using OpenQA.Selenium.Chrome;
+
+namespace CSF.Screenplay.Selenium;
+
+public class CiChromeOptionsCustomizer : ICustomizesOptions
+{
+ public void CustomizeOptions(ChromeOptions options)
+ {
+ options.AddArguments("--disable-dev-shm-usage", "--headless", "--no-sandbox", "--disable-gpu", "--window-size=1280,1024");
+ }
+}
\ No newline at end of file
diff --git a/Tests/CSF.Screenplay.Selenium.Tests/appsettings.json b/Tests/CSF.Screenplay.Selenium.Tests/appsettings.json
index 05665cd4..09804c0a 100644
--- a/Tests/CSF.Screenplay.Selenium.Tests/appsettings.json
+++ b/Tests/CSF.Screenplay.Selenium.Tests/appsettings.json
@@ -8,6 +8,10 @@
"DriverType": "ChromeDriver",
"DriverFactoryType": "CSF.Screenplay.Selenium.VerboseChromeDriverFactory, CSF.Screenplay.Selenium.Tests"
},
+ "CiHeadlessChrome": {
+ "DriverType": "ChromeDriver",
+ "OptionsCustomizerType ": "CSF.Screenplay.Selenium.CiChromeOptionsCustomizer, CSF.Screenplay.Selenium.Tests"
+ },
"BrowserStack": {
"DriverType": "RemoteWebDriver",
"DriverFactoryType": "CSF.Screenplay.Selenium.BrowserStack.BrowserStackDriverFactory, CSF.Screenplay.Selenium.Tests"