Created
October 11, 2018 14:11
-
-
Save elgatov/132c0c0a655e7a9357de8f47d0f77e07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static RemoteWebDriver GenerarRemotoChromeDriver() | |
{ | |
//DesiredCapabilities capability = DesiredCapabilities.Chrome(); | |
var chromeOptions = new ChromeOptions(); | |
chromeOptions.AddArguments("no-sandbox"); | |
chromeOptions.AddArguments("disable-infobars"); | |
chromeOptions.AddArguments("disable-notifications"); | |
chromeOptions.AddArguments("--start-maximized"); | |
chromeOptions.AddUserProfilePreference("profile.default_content_settings.popups", 0); | |
chromeOptions.SetLoggingPreference(LogType.Browser, (LogLevel)GlobalSettings.LogLevel); | |
//capability.SetCapability(ChromeOptions.Capability, chromeOptions.ToString()); | |
//return new RemoteWebDriver(UriServerHubSelenium, capability, TimeSpan.FromSeconds(90)); | |
return new RemoteWebDriver(UriServerHubSelenium, chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(10)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment