Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1b07763

Browse files
committed
Setting flags when browser and driver location are set.
This makes tests under Ubuntu and CI be stable.
1 parent 3c9827e commit 1b07763

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/dotnet/SeleniumDocs/BaseTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ protected void StartDriver(string browserVersion = null)
3939
if (browserVersion != null)
4040
{
4141
options.BrowserVersion = browserVersion;
42+
string userDataDir = System.IO.Path.Combine(System.IO.Path.GetTempPath(), System.IO.Path.GetRandomFileName());
43+
System.IO.Directory.CreateDirectory(userDataDir);
44+
options.AddArgument($"--user-data-dir={userDataDir}");
45+
options.AddArgument("--no-sandbox");
46+
options.AddArgument("--disable-dev-shm-usage");
4247
}
4348
driver = new ChromeDriver(options);
4449
}

0 commit comments

Comments
 (0)