Code cleanup
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Chrome;
|
||||
|
||||
@@ -10,10 +9,9 @@ public static class DriverFactory
|
||||
{
|
||||
var options = new ChromeOptions();
|
||||
var headless = Environment.GetEnvironmentVariable("HEADLESS");
|
||||
if (!string.IsNullOrEmpty(headless) && (headless == "1" || headless.Equals("true", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(headless) &&
|
||||
(headless == "1" || headless.Equals("true", StringComparison.OrdinalIgnoreCase)))
|
||||
options.AddArgument("--headless=new");
|
||||
}
|
||||
|
||||
options.AddArgument("--disable-gpu");
|
||||
options.AddArgument("--no-sandbox");
|
||||
@@ -24,4 +22,4 @@ public static class DriverFactory
|
||||
|
||||
return new ChromeDriver(service, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user