Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions Tests/BaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@ public class BaseTest
public virtual void Setup()
{
var options = new ChromeOptions();

// Common Chrome options for both local and CI environments
options.AddArguments("headless", "disable-gpu", "window-size=1280x1024", "no-sandbox");

// Conditionally add user data dir for CI environment (GitHub Actions)
if (Environment.GetEnvironmentVariable("GITHUB_ACTIONS") != null)
{
options.AddArguments($"--user-data-dir=/tmp/chrome-{Guid.NewGuid()}"); // Unique directory for CI
}
// Using Incognito mode in both local and CI environments to avoid session sharing
options.AddArguments("incognito");

_driver = new ChromeDriver();
_basePage = new BasePage(_driver);
Expand Down
Loading