This question already has an answer here:
I've been trying to set a 3 minute timeout instead of the default 60 seconds. It seems this should be correct according to the documentation I've seen. Any help is appreciated!
This runs first
public void BeforeScenario1()
Driver = CreateDriver();
Driver.Manage().Timeouts().PageLoad = TimeSpan.FromMinutes(3);
Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMinutes(3);
Driver.Manage().Window.Position = new System.Drawing.Point(0, 0);
Driver.Manage().Window.Maximize();
}
The CreateDriver() method just adds the chrome arguments, I'm trying to set the timeout value in the method above.
private static ChromeOptions GetChromeOptions()
{
var chromeOptions = new ChromeOptions();
chromeOptions.AddArgument("no-sandbox");
chromeOptions.AddUserProfilePreference("download.default_directory", Config.TempPath);
chromeOptions.AddUserProfilePreference("download.prompt_for_download", false);
chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true");
if (Config.IsHeadless)
{
chromeOptions.AddArgument("headless");
}
chromeOptions.AddArgument("--disable-dev-shm-usage");
chromeOptions.AddArgument("proxy-server='direct://'");
chromeOptions.AddArgument("proxy-bypass-list=*");
chromeOptions.SetLoggingPreference(LogType.Browser, Config.BrowserErrorLoggingType);
return chromeOptions;
}