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

Commit 86a3605

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

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/dotnet/SeleniumDocs/Browsers/ChromeTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ public void Arguments()
4444
[TestMethod]
4545
public void SetBrowserLocation()
4646
{
47+
string userDataDir = System.IO.Path.Combine(System.IO.Path.GetTempPath(), System.IO.Path.GetRandomFileName());
48+
System.IO.Directory.CreateDirectory(userDataDir);
4749
var options = new ChromeOptions();
50+
options.AddArgument($"--user-data-dir={userDataDir}");
51+
options.AddArgument("--no-sandbox");
52+
options.AddArgument("--disable-dev-shm-usage");
4853

4954
options.BinaryLocation = GetChromeLocation();
5055

0 commit comments

Comments
 (0)